I've seen several messages in this group with this question and no reply.
Simply stated, how do you send the status of a group of radio buttons to
a JavaScript function? I have a large project that needs this. Since I
cannot figure it out, I wrote a small page to experiment with it. Here
it is.
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta http-equiv="content-type" content="text/html; charset=ISO-8859-1">
<title>An Experiment In Radio Buttons</title>
<script language="javascript">
function checkInput(sentCheckedStatus)
{
alert("The radio button status is " + sentCheckedStatus);
}
</script>
</head>
<body style="color: rgb(0, 0, 0); background-color: rgb(255, 255, 255);"
alink="#000088" link="#0000ff" vlink="#ff0000">
This is an experiment in radio buttons.
<form name="theForm" action="RBserver.php" method="post"
onsubmit="checkInput(theButtons.value)"> <br>
/* Substitute ...(theButtons.checked)... in the line above and it
still returns "undefined" no matter what. */
<br>
<center> <input name="theButtons" value="it" type="radio">IT<br>
<input name="theButtons" value="notit" type="radio">NOT IT<br>
<br>
<input value="give it a go" type="submit"> </center>
</form>
</body>
</html>
I know I can send the value of a text box or another input field this
way. Thank you in advance for your help.