467,163 Members | 986 Online
Bytes | Developer Community
Ask Question

Home New Posts Topics Members FAQ

Post your question to a community of 467,163 developers. It's quick & easy.

Unselecting one Radio button

Hi, I need help!

I Would like to know of one can unselect a radio button.

i know one can unselect a radio button by selecting another radio button.

but what happens when there is only one, is there a way i can select & unselect the radio button?

Any ideas,

Feb 27 '08 #1
  • viewed: 5691
1 Reply
Expert 4TB
I found this some time ago on the web, and it works.It resets all radio buttons in the named group:[html]<input type="radio" name="dutyid" value="1">One
<input type="radio" name="dutyid" value="2">Two
<input type="radio" name="dutyid" value="3">Three
<input type="button" name="do" value="Deselect" onclick="javascript:unselect()">

function unselect()
var oRadio = document.getElementsByName("dutyid");
oRadio[i].checked = false;
Feb 27 '08 #2

Post your reply

Sign in to post your reply or Sign up for a free account.

Similar topics

5 posts views Thread by Digital Puer | last post: by
3 posts views Thread by John Davis | last post: by
8 posts views Thread by David Cameron | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.