B
Brian A
Let's say I have, in a form, the name 'firstName' .
eg. <input type="text" name="firstName" />
When the form is submitted I can get a value for this with syntax:-
fn=form.firstName.value;
This works. 'fn' gives the value of 'firstName', so no problem there.
However, it means that for every name in the form I have
to include a similar statement. I want to put this in a loop and feed
in different names. I can get them from the DOM.
Clearly it obviously isn't possible to do the following, though it
illustrates what I want to do.
x=firstName;
fn=form.x.value;
(where x replaces 'firstName')
So what method can I use?
---
Remove 'no_spam_' from email address.
Sign the petition to get High Definition TV via Freeview.
Get your friends to sign too!
Ofcom want to auction off the spectrum needed for Hi Def.
TV.
http://petitions.pm.gov.uk/High-Definition/
---
eg. <input type="text" name="firstName" />
When the form is submitted I can get a value for this with syntax:-
fn=form.firstName.value;
This works. 'fn' gives the value of 'firstName', so no problem there.
However, it means that for every name in the form I have
to include a similar statement. I want to put this in a loop and feed
in different names. I can get them from the DOM.
Clearly it obviously isn't possible to do the following, though it
illustrates what I want to do.
x=firstName;
fn=form.x.value;
(where x replaces 'firstName')
So what method can I use?
---
Remove 'no_spam_' from email address.
Sign the petition to get High Definition TV via Freeview.
Get your friends to sign too!
Ofcom want to auction off the spectrum needed for Hi Def.
TV.
http://petitions.pm.gov.uk/High-Definition/
---