Forum Moderators: open
I have created three checkboxes 0,1,2 in ASP and calling a function ('one') in JS.
The condition is while I check the checkbox '2',the checkboxes '0' and '1' sould turn false.
Also, when I check the checkboxes '0' and '1', the checkbox 2 should turn false.
While I use the code below, it occurs like
"When I check checkbox '2' and then check '0' and '1' it works fine. THe checkbox '2' is set to false and I can check only '0' or '1'. But if I check '0' or '1' and then 2, am not able to check it and '0' and '1' doesnt get turned to false.
Kindly anyone help me out of this simple issue which is hitting me!
function trial()
{
if ((frmMain.ChkQuest(0).checked) ¦¦ (frmMain.ChkQuest (1).checked))
{
if (frmMain.ChkQuest(2).checked)
{
frmMain.ChkQuest(0).checked = false;
frmMain.ChkQuest(1).checked = false;
}
}
if (frmMain.ChkQuest(2).checked)
{
if ((frmMain.ChkQuest(0).checked) ¦¦ (frmMain.ChkQuest(1).checked))
{
frmMain.ChkQuest(2).checked = false;
}
}
}