[thelist] JavaScript form validation - do all radio groups have aselection checked?

Canfield, Joel JCanfield at PacAdvantage.org
Mon Aug 1 13:51:40 CDT 2005


> >         alert("in the script")
> >         myWholeFormArray = document.theForm.elements
> >         for (a = 0; a < myArray.length; a++
> 
> ^ you forgot to close the parenthesis.

good catch; not the whole solution, but necessary; thanks

> Other things that might cause it: onSubmit instead of onsubmit

I use lower case all the time, so I don't think that's it

> form as variable name (might be reserved)

Nope; all my js validation works this way

> What does the JavaScript console say? I found the above with this
> wonderful tool.

Wow. I should rummage around in FireFox a little more. Once I found
this, magical things started happening.

'elements is not an object' - I need to create the array from the form,
not form.elements

still working on it, but closer

boy my js is ruuuuuuuuuuuuuuuuuuuuusssssssssssstttyy

joel


More information about the thelist mailing list