[Javascript] Retaining values
tedd
tedd at sperling.com
Mon Apr 11 19:54:24 CDT 2011
At 11:01 PM +0000 4/11/11, Troy III Ajnej wrote:
>Hello Tedd.
>Yes, see the problem.
>But, I can't see the script...
>Sometimes the approach does the thing we don't want it to do.
>I suspect you are overwritting the added fields, because the 1st
>hardcoded field is retaining its value.
>Regards.
Troy:
Good to hear from you again -- it's been awhile.
Here's the script:
http://www.webbytedd.com/aa/add-text-field/a.js
True, the first text box is hardwired, so the value remains regardless.
Also true if the user clicks Submit, than ALL text boxes retain their
values because I have that scripted via PHP -- so, that's not a
problem.
The problem only comes about when the user enters data into newly
created text box(es) and then clicks "Add Another Field". The
addition of another new text box voids all data collected in the
previous text boxes (except for the original).
I was hoping to grab the values in the previous text boxes prior to
creating another new field and then repopulating after the insert,
but I don't know how to do that -- thus the reason for my question.
Have I made this problem clear?
Cheers,
tedd
--
-------
http://sperling.com/
More information about the Javascript
mailing list