786snow
Programmer
- Nov 12, 2006
- 75
Hi,
Briefly what the following function does, if all the check boxes in the array of check boxes are checked then it checks the "check_all" checkbox, and if any one of them is checked off then it checks off the "check_all" check box as well
*********
function func_setSelectAll(){
for (i=0;i<array_checkboxesToCheck.length;i++){
bool_allSelected&=document.getElementById(array_checkboxesToCheck).checked;
}
document.getElementById('check_all').checked=bool_allSelected;
bool_allSelected=true;
}
**************************
I understand how it works when all are chcked then "check_all' also gets checked, but I don't know how it is working , if one of them is checked off then "check_all" also gets checked off?
Also what is &=
as they are doing bool_allSelected&=document.getElementById(array_checkboxesToCheck).checked;