Shane43
11-28-2002, 01:51 PM
Hey guys-
I want to use javascript to error check a form before it is submitted. The problem I am having is that the input names are in the form of an array name (and I cannot change the names because the action script needs them to be this way).
Normally if I had an <input name="email"> I could use:
if(form.email.value=="") alert("blah...");
But, if the input name resembles an array, like <input name="user[email]"> then how do I access that value?
Using:
if(form.user[email].value=="") ...
does not work.
Any suggestions?
Thanks,
Shane
I want to use javascript to error check a form before it is submitted. The problem I am having is that the input names are in the form of an array name (and I cannot change the names because the action script needs them to be this way).
Normally if I had an <input name="email"> I could use:
if(form.email.value=="") alert("blah...");
But, if the input name resembles an array, like <input name="user[email]"> then how do I access that value?
Using:
if(form.user[email].value=="") ...
does not work.
Any suggestions?
Thanks,
Shane