[thelist] javascript - radio button validation

Matthew Fischer mfischer at e-fishsolutions.com
Fri Apr 20 22:17:52 CDT 2001


On 4/20/01 at 11:07 PM, Marc Seyon <seyon at carib-link.net> wrote:

> 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?

Try:

if ((document.form.BrowserTestYN[0].checked == false) && (document.form.BrowserTestYN[1].checked == false))





More information about the thelist mailing list