title: On Submit - Check at least one checkbox
body: <p>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</p>
  
  <pre><code>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:");  }
              } 
          } 
          document.holiDay.command.value= 'addingApp'; //My struts Action to perform if selected
          document.holiDay.submit(); 
      }    
  }
  </code></pre>