|
Posted by Brad Everman on 09/25/06 14:32
In a contingent reality, Colin Fine possibly said:
> When I've done this, it's never occurred to me to try and use the same
> names for the inputs in the new rows as the existing rows: I've always
> generated distinct names for each input.
> I can see it would be easier to process it the way you are doing it: are
> we sure that it works to add further inputs with the same names as
> existing ones?
Thanks for the other replies; it was a stupid, stupid problem that was
fixed after much trial and error. Apparently, Javascript does not like
forms to be contained within <div> tags outside of where it has control.
To answer your question, it works perfectly. Since I am storing the values
in an array, dynamically created portions of the form simply append to the
same array. When you can have up to 200-300 lines of entry, it's a lot
easier to keep track of them all with one variable name as opposed to
several hundred.
[Back to original message]
|