Hello,
My issue deals with an ASP.Net 2.0 wizard
I want to give the possibility to the user to click on a "Not
applicable" CheckBox.
When he/she clicks on this CheckBox, 3 radiobuttons should be checked
automatically using Javascript
This is what I have done:
1) I add an "OnClick" event to the CheckBox (CB_na_BIB) with a
reference to the 3 radiobuttons
CB_na_BIB.Attributes.Add("onClick", "HandleNotApplicableSection('" &
CB_na_BIB.ClientID & "','" & BIB_1_1_5.ClientID & "','" &
BIB_2_1_5.ClientID & "','" & BIB_3_1_5.ClientID & "')")
2) the JS function is as follows:
function HandleNotApplicableSection(_CB_NotAppl, _RB_1, _RB_2, _RB_3)
{
if(document.getElementById(_CB_NotAppl).checked=true)
{
document.getElementById(_RB_1).checked=true;
document.getElementById(_RB_2).checked=true;
document.getElementById(_RB_3).checked=true;
}
else
{
document.getElementById(_RB_1).checked=false;
document.getElementById(_RB_2).checked=false;
document.getElementById(_RB_3).checked=false;
}
}
ISSUE: when I check the CheckBox, the function works properly and the
3 radiobuttons are checked. But, no way to un-check the CheckBox after
that.
Thanks in adavnce for your support,
Michel