<html>
<head>
<title>Radio Button</title>
<script language="JavaScript" type="text/JavaScript">
<!--
function uncheckRadio() {
var choice = document.form1.Sleepy;
for (i = 0; i < choice.length; i++) {
if ( choice[i].checked = true )
choice[i].checked = false;
}
}
function uncheckRadio1(){
var choice = document.form1.Thirsty;
for (i = 0; i < choice.length; i++) {
if ( choice[i].checked = true )
choice[i].checked = false;
}
}
function uncheckRadio2(){
var choice = document.form1.Hungry;
for (i = 0; i < choice.length; i++) {
if ( choice[i].checked = true )
choice[i].checked = false;
}
}
//-->
</script>
</head>
<body>
<form method="post" action="MyPage.asp">
<table>
<tr><td align="right">
<b>Are you sleepy? </b>
</td><td>
<label>
<input type="radio" name="Sleepy" value="Yes" ondblclick="uncheckRadio();"><b>Yes</b></label>
</td><td>
<label><input type="radio" name="Sleepy" value="No" ondblclick="uncheckRadio();"><b>No</b></label>
</td></tr>
<tr><td colspan="3"> </td></tr>
<tr><td align="right">
<b>Are you thirsty? </b>
</td><td>
<label>
<input type="radio" name="Thirsty" value="Yes" ondblclick="uncheckRadio();"><b>Yes</b></label>
</td><td>
<label><input type="radio" name="Thirsty" value="No" ondblclick="uncheckRadio();"><b>No</b></label>
</td></tr>
<tr><td colspan="3"> </td></tr>
<tr><td align="right">
<b>Are you hungry? </b>
</td><td>
<label>
<input type="radio" name="Hungry" value="Yes" ondblclick="uncheckRadio();"><b>Yes</b></label>
</td><td>
<label><input type="radio" name="Hungry" value="No" ondblclick="uncheckRadio();"><b>No</b></label>
</td></tr>
</table>
<input type="submit" name="Submit" id="flashingtext" value="Submit" />
</body>
</html>
|