[thelist] javascript - radio button validation

mccreath mccreath at ak.net
Fri Apr 20 22:17:57 CDT 2001


I know very little about JavaScript, so this may be offbase, but I think to
reference the FORM object in Netscape, you have to use the name of the
actual form. So maybe "document.myformname.BrowserTestYN(n).checked"?

David

> -----Original Message-----
> From: Marc Seyon
>
> Hi all,
>
> Have been using this line to test whether either of two radio buttons was
> checked, radio buttons being named "BrowserTestYN", values 0 and 1
> respectively.
>
> <snippet>
> if (document.form.BrowserTestYN(0).checked == "" &&
> document.form.BrowserTestYN(1).checked == "")
> </snippet>
>
> This works fine with IE, but not with Netscape 4x. Can anyone tell me why?
>
> Is it a coding error? Or just not supported?
>
> Thanks.





More information about the thelist mailing list