Hi, I have multiple check boxes. When the Submit button is clicked I want to check if at least one checkbox is selected. Its not working
function doSubmit(){
function check_checkboxes()
{
checked=false;
var c = document.getElementsByTagName('input');
for (var i = 1; i < c.length; i++)
{
if (c[i].type == 'checkbox')
{
if (c[i].checked) {
return true}
else {alert("Please identify what warehouses comply:"); }
}
}
document.holiDay.command.value= 'addingApp'; //My struts Action to perform if selected
document.holiDay.submit();
}
}