Hi Josh
try this, it works for me
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<html>
<head>
<title> New Document </title>
<script type="text/javascript">
function on_off(me)
{
if(me.value=='off'){me.checked=true;me.value='on'} else{me.checked=false;me.v
alue='off'};
alert(me.checked);
}
</script>
</head>
<body>
<input type="radio" value="off" id="radioTemporary" name="redirectType"
onclick="on_off(this)" />
</body>
</html>
Chris
<jb****@heraldic.us> wrote in message
news:11**********************@f14g2000cwb.googlegr oups.com...
I have a radio button, and I would like to use JS to allow it to be
unselected when you click an already selected radio button. I thought
this would be really simple. Here is what I'm doing:
<input type="radio" value="temporary" id="radioTemporary"
name="redirectType" onclick="if(this.checked==true){this.checked=false ;
}" />
I expected this to uncheck the radio button if it was clicked when
already checked. However, it effectively prevents it from being
selected. Any help?
-Josh