I tried using javascript samples that I found here and other places. The problem is that I am using a Table control working at the server, so the javascript I was using does not
Use querySelectorAll to check for any unchecked check boxes. If there are any, throw the error message, else postback.
function checkCheckboxes(){
if(document.querySelectorAll('input[type="checkbox"]:not(:checked)').length > 0){
alert("all checkboxes must be checked");
return false;
} else{
return true;
}
}
Note: this will only work in Modern browsers Firefox 3.1+, IE8+ (only in IE8 standards mode), and Safari 3.1+