By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
424,680 Members | 1,890 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 424,680 IT Pros & Developers. It's quick & easy.

how to handle complex form

P: n/a
Hello,
I have to create a complex form to handle company product returns.
Right now, I have some form fields to describe the product being returned,
productID, productDES,ProductQTY.
Thats fine. I have a button that will dynamically create those
fields with javascript, with an 'add more' button. It creates a line
with consecutive names like
productID[1], productDES[1]...productID[2]...productID[3]...
similar to this
http://chucklarge.mine.nu/test/javas...element-02.htm

Ok, so the problem i have is for each one of those lines of products to
return, serial
numbers need to be entered that match the Quantity being returned.
There can
be hundreds or more of each different product to return.
The client mentioned having a popup window that would allow you to enter
each of
the serial numbers and have those linked to the form line of the main
page.
This sounds fine with me, as long as they don't complain later about
popup blockers,

anyway, unless there is a better way to handle this, I will create a
popup that has
one line of fields, the serial number is entered, and the condition and
then you
hit and add button and it populates the info below, then you keep
entering the
other serial numbers.

I guess then I want to know how to get the info back to the main page.
I will
store all the serial numbers in an array, so hopefully that will make it
easier,
but then where does that info get stored on the main page, and can it all
be submitted when the main form is submitted?

sorry I am just a little lost on this idea and am looking for advice.

thanks,
Chuck
Nov 4 '05 #1
Share this Question
Share on Google+
1 Reply


P: n/a
chuck wrote:
Hello,
I have to create a complex form to handle company product returns.
Right now, I have some form fields to describe the product being returned,
productID, productDES,ProductQTY.
Thats fine. I have a button that will dynamically create those
fields with javascript, with an 'add more' button. It creates a line
with consecutive names like
productID[1], productDES[1]...productID[2]...productID[3]...
similar to this
http://chucklarge.mine.nu/test/javas...element-02.htm

Ok, so the problem i have is for each one of those lines of products to
return, serial
numbers need to be entered that match the Quantity being returned. There
can
be hundreds or more of each different product to return.
You have many serial numbers for each product?

The client mentioned having a popup window that would allow you to enter
each of
the serial numbers and have those linked to the form line of the main page.
This sounds fine with me, as long as they don't complain later about
popup blockers,
Popup blockers usually only block unrequested pop-ups, but not all. You
can create an HTML element that mimics a popup (say use a div) and then
put the serial numbers into an option list or text list with onclick
attributes.

anyway, unless there is a better way to handle this, I will create a
popup that has
one line of fields, the serial number is entered, and the condition and
then you
hit and add button and it populates the info below, then you keep
entering the
other serial numbers.
You could put the serial numbers into script files as an array or object
and load the associated file only if the product is selected. They need
only be loaded once each (or just load them anyway...).

The defer attribute can be used so that the page keeps loading other
content while the serial number script files are loaded (in theory anyway).

I guess then I want to know how to get the info back to the main page. I
will
store all the serial numbers in an array, so hopefully that will make it
easier,
but then where does that info get stored on the main page, and can it all
be submitted when the main form is submitted?


When the serial number is selected, write it to a field in the form and
it will be submitted with the form. You may want to make the field
readonly so the user doesn't mess with it, or write the number to a
hidden field and display the number as text.

It may seem simple, but you need quite a bit of logic to handle the
interface, it's very easy to end up with non-matching products and
serial numbers.
--
Rob
Nov 4 '05 #2

This discussion thread is closed

Replies have been disabled for this discussion.