title: how to check if all checkbox is unchecked
body: <p>I have form like this:</p>
  
  <p><img src="https://i.stack.imgur.com/tIkNN.png" alt="enter image description here"></p>
  
  <p>So, if i checked the checkbox and then click edit, it will redirect to editing page and showing the checked data only.</p>
  
  <p>The problems is appear if i didn't check any checkbox and then click edit or delete, it will show error message, probably because no data selected/checked.</p>
  
  <p>So i want my edit and delete button to have some kind of alerts, so if i didn't check any data and then click edit or delete, i want it to show alerts or at least didn't do anything.</p>
  
  <p>Here's my form code:</p>
  
  <pre><code>&lt;form name='frmedit' method='post' action=''&gt;
  &lt;table&gt;
  &lt;tr&gt;
  &lt;td&gt;&amp;#10003;&lt;/td&gt;
  &lt;td&gt;No.&lt;/td&gt;
  &lt;td&gt;Nama&lt;/td&gt;
  &lt;td&gt;Merk&lt;/td&gt;
  &lt;/tr&gt;
  &lt;tr&gt;
        &lt;td&gt;&lt;input type='checkbox' name='cek[]' value='$data[id_usulan]' &gt;&lt;/td&gt;
        &lt;td&gt;$no.&lt;/td&gt;
        &lt;td&gt;$data[nama]&lt;/td&gt;
        &lt;td&gt;$data[merk]&lt;/td&gt;
  &lt;/tr&gt;
  &lt;/table&gt;
  
  &lt;table&gt;
  &lt;tr&gt;
  &lt;td&gt;&lt;input type='checkbox' name='allbox' value='check' onClick='checkAll(0);'/&gt;Check All
  &amp;nbsp;|&amp;nbsp;
  &lt;input type='button' name='update' value='Edit' onClick='setUpdateAction();'/&gt;
  &amp;nbsp;|&amp;nbsp;
  &lt;input type='button' name='delete' value='Delete'  onClick='setDeleteAction();' /&gt;&lt;/td&gt;
  &lt;/tr&gt;
  &lt;/table&gt;
  &lt;/form&gt;
  </code></pre>
  
  <p>The edit and delete function is in onClick, and the function is:</p>
  
  <pre><code>function setUpdateAction() {
  
  if($('#frmedit input[type="checkbox"]').is(':checked')){
      document.frmedit.action = "edit_user.php";
  document.frmedit.submit();
      }else{
  alert("Please check at least one.");
  return false;
      }
  }
  </code></pre>
  
  <p>As for setDeleteAction, i still didn't do anything.</p>
  
  <p>Thank You.</p>