Posted By

kgl on 07/09/06


Tagged

form javascript check


Versions (?)

select/deselect-all control


 / Published in: JavaScript
 

  1. <script type="text/javascript">
  2. <!--
  3. function checkAll(wotForm,wotState) {
  4. for (a=0; a<wotForm.elements.length; a++) {
  5. if (wotForm.elements[a].id.indexOf("delete_") == 0) {
  6. wotForm.elements[a].checked = wotState ;
  7. }
  8. }
  9. }
  10. // -->
  11. </script>
  12.  
  13. <input type="checkbox" onClick="checkAll(this.form,this.checked);" />

Report this snippet  

You need to login to post a comment.