[Javascript] Form validation

Chris Tifer christ at saeweb.com
Tue Jan 20 08:26:56 CST 2004


> form.array[i].focus();
--------------------------
As long as it's an input of some sort, you can always do:

form.elements[array[i]].focus()

Now I'm assuming array[i] just refers to to a string. Not to an actual
element. If it's an element, it'd probably error out.

And I am also assuming that you did not name your array, array[]. Correct?
If so, call it something like arrFields or something else.






More information about the Javascript mailing list