By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
437,738 Members | 1,114 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 437,738 IT Pros & Developers. It's quick & easy.

Unselecting one Radio button

P: 200
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
Share this Question
Share on Google+
1 Reply

Expert 2.5K+
P: 4,258
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.