Denis Orozco
asked on
uncheck, check RadioButton little javascript function
hi there,
I need a little function to work the following way:
I have two RadioButtons
<asp:RadioButton ID="rdYes" onClick="uncheckRadio()" runat="server" Text="Yes" Font-Names="Verdana, Arial, Helvetica" Font-Size="10pt" />
<asp:RadioButton ID="rdNo" onClick="uncheckRadio()" runat="server" Text="No" Font-Names="Verdana, Arial, Helvetica" Font-Size="10pt" />
and what i need the function to do is when Yes is Checked then NO should be unchecked and vice versa. One RadioButton should be checked at the time.
I know a RadioButtonList will take care of this for me but i have some other events and i need them individually.
Thanks,
COHFL
I need a little function to work the following way:
I have two RadioButtons
<asp:RadioButton ID="rdYes" onClick="uncheckRadio()" runat="server" Text="Yes" Font-Names="Verdana, Arial, Helvetica" Font-Size="10pt" />
<asp:RadioButton ID="rdNo" onClick="uncheckRadio()" runat="server" Text="No" Font-Names="Verdana, Arial, Helvetica" Font-Size="10pt" />
and what i need the function to do is when Yes is Checked then NO should be unchecked and vice versa. One RadioButton should be checked at the time.
I know a RadioButtonList will take care of this for me but i have some other events and i need them individually.
Thanks,
COHFL
ASKER
How do i call it?
OnClick="setCheckedValue(? ?,??)
OnClick="setCheckedValue(?
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
You don't want to use RadioButtonList : http://msdn.microsoft.com/en-us/library/system.web.ui.webcontrols.radiobuttonlist(v=vs.80).aspx
Else why not use :
Else why not use :
<input type="radio" name="yesorno" ID="rdYes" value="Yes" />Yes<br>
<input type="radio" name="yesorno" ID="rdNo" value="No" />No<br>
Open in new window