title: Checkbox validation - at least one selected
body: <p>I have number of checkboxes and another checkbox for "Select All"</p>
  
  <p>I want to check if the user has selected at least one checkbox. Need modification in javascript</p>
  
  <pre><code>&lt;script language="Javascript"&gt;
  
  function doSubmit(){
  function check_checkboxes() 
  { 
  checked=false;
  var c = document.getElementsByTagName('INPUT'); 
  for (var i = 1; i &lt; c.length; i++) 
  { 
      if (c[i].type == 'checkbox') 
      { 
      if (c[i].checked) {
      return true} 
      else {alert("Please identify what warehouses comply:");  }
          } 
      } //if I place my struts action here..its not working?
  }    
  document.holiDay.command.value= 'addingApp'; //My Struts action if something checked. 
  document.holiDay.submit(); 
  }    
  </code></pre>