Click to See Complete Forum and Search --> : Unselect Radio Button
smh
Dec 21st, 2001, 01:51 PM
Once a radio button is selected, how can you unselect it without selecting another radio button (no radio buttons should be selected)?
thinktank2
Dec 21st, 2001, 03:46 PM
<html>
<head>
<title>Test</title>
<script>
function unselect(){
f.sex[0].checked = false
f.sex[1].checked = false}
</script>
</head>
<body>
<form name="f">
Male<INPUT TYPE="radio" NAME="sex">
Female<INPUT TYPE="radio" NAME="sex">
<Input type="Button" value="Unselect" onclick="unselect()">
</form>
</body>
</html>
smh
Dec 21st, 2001, 03:49 PM
I do not want to use a button to clear the contents though. I want to click the radio button a second time to unselect it.
thinktank2
Dec 21st, 2001, 04:05 PM
HOw could that be possible...
It will trigger the unselect function on clicking the radio..so no one can in effect actually use the radio button...even for the first time.
smh
Dec 21st, 2001, 04:08 PM
I have found a way to do this, but I will have to post back later, as it is time to get out of the office....
vbforums.com
Copyright Internet.com Inc., All Rights Reserved.