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

?? document.form.radio.value ??



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.

Thanks.

Bill
==========================================
<script language=javascript>
<!--  hide this stuff

function radioclick(foo) {
  alert(foo);
  alert(document.itemsform.itemx.value);   // This reports <undefined>
}

//   Stop hiding    -->

</script>

<form name="itemsform" action="foo">

<input type="radio" name="itemx" value="pasta" onClick="radioclick('pasta')">
Pasta<br>
<input type="radio" name="itemx" value="tomsauce"
onClick="radioclick('tomsauce')"> Tomato Sauce

</form>

--------------------------------------------------------------------
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'.