[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 


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