N
Nongo
How come I can access a button's value, but not a radio
button's value? As in the following:
<html>
<head>
<meta http-equiv="Content-Type" content="text/html;
charset=windows-1252">
<meta name="GENERATOR" content="Microsoft FrontPage 4.0">
<meta name="ProgId" content="FrontPage.Editor.Document">
<title>Test Radio Buttons</title>
</head>
<script language=JavaScript>
function ShowValues() {
alert(form1.B1.value); // Prompts correctly with "Button"
alert(form1.R1.value); // Prompts with "undefined"
}
</script>
<body onclick="ShowValues()">
<form name="form1" method="POST" action="--WEBBOT-SELF--">
<!--webbot bot="SaveResults" U-
File="fpweb:///_private/form_results.txt"
S-Format="TEXT/CSV" S-Label-Fields="TRUE" -->
<p><input type="radio" value="V1" checked name="R1"></p>
<p><input type="radio" name="R1" value="V2"></p>
<p><input type="submit" value="Button" name="B1">
</form>
</body>
</html>
Put in another way - how does one determine which of the
radion buttons is selected?
Thanks in advance.
button's value? As in the following:
<html>
<head>
<meta http-equiv="Content-Type" content="text/html;
charset=windows-1252">
<meta name="GENERATOR" content="Microsoft FrontPage 4.0">
<meta name="ProgId" content="FrontPage.Editor.Document">
<title>Test Radio Buttons</title>
</head>
<script language=JavaScript>
function ShowValues() {
alert(form1.B1.value); // Prompts correctly with "Button"
alert(form1.R1.value); // Prompts with "undefined"
}
</script>
<body onclick="ShowValues()">
<form name="form1" method="POST" action="--WEBBOT-SELF--">
<!--webbot bot="SaveResults" U-
File="fpweb:///_private/form_results.txt"
S-Format="TEXT/CSV" S-Label-Fields="TRUE" -->
<p><input type="radio" value="V1" checked name="R1"></p>
<p><input type="radio" name="R1" value="V2"></p>
<p><input type="submit" value="Button" name="B1">
</form>
</body>
</html>
Put in another way - how does one determine which of the
radion buttons is selected?
Thanks in advance.