Hello,
I have 3 sets of checkboxes as below:
Set A
*
*
*
Set B
*
*
Set C
*
*
*
When I click a checkbox in set A, the other are set to false. The problem is that when I check a button all the others are set to false, while I would like to handle the 3 sets separately. That means, I would like to obtain mutual exclusion for the 3 sets separately. I'm using the code below, how can I modify it to distinct from which set the event is from?
<script language="javascript" type="text/javascript">
function SelectSingleButton(id) {
var Btn = document.getElementById(id);
var BtnList = document.getElementsByTagName("input");
for (i = 0; i < BtnList.length; i++) {
if (BtnList[i].type == "checkbox" && BtnList[i].id != Btn.id) {
BtnList[i].checked = false;
}
}
}
</script>
// List of Checkbo ...
Go to the complete details ...