[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: ?? document.form.radio.value ??

Radio buttons are arrays, so the correct syntax (for the first button) is:


At 04:35 AM 2/21/96 EST, you wrote:
>In the JavaScript code below, the second alert displays 
>      <undefined>.
>If I do exactly the same thing but using a checkbox, it works fine.  
>Am I doing something wrong or is this a bug?
>Netscape 2.0 final, PowerMac 7100/80.
><script language=javascript>
><!--  hide this stuff
>function radioclick(foo) {
>  alert(foo);
>  alert(document.itemsform.itemx.value);   // This reports <undefined>
>//   Stop hiding    -->
><form name="itemsform" action="foo">
><input type="radio" name="itemx" value="pasta" onClick="radioclick('pasta')">
><input type="radio" name="itemx" value="tomsauce"
>onClick="radioclick('tomsauce')"> Tomato Sauce

This message came from the mailing list javascript. For help using the
mailing list software, please send a message to 'majordomo@obscure.org'
with the message body 'help'. To unsubscribe, send a message to
'majordomo@obscure.org' with the message body 'unsubscribe javascript'.