J
jbeall
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
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