var all=document.getElementById('holiDay');
The HTML ids must be unique, so getElementById returns only one element. Perhaps you can try getElementsByTagName - http://msdn.microsoft.com/en-us/library/ms536439(VS.85).aspx ?
Sort of...
function check_checkboxes() { var c = document.getElementsByTagName('input'); for (var i = 0; i < c.length; i++) { if (c[i].type == 'checkbox') { if (c[i].checked) {return true} } } return false; }
and change the Validate function to ...
function Validate() { if(!check_checkboxes()) { alert("Please identify what warehouses comply:"); return false; } return true; }
source share