Never been to CodeSnippets before?

Snippets is a public source code repository. Easily build up your personal collection of code snippets, categorize them with tags / keywords, and share them with the world (or not, you can keep them private!)

Check all checkbox in the form (See related posts)

// description of your code here

<SCRIPT LANGUAGE="JavaScript">
function checkAll() {
    var theForm, z = 0;
    theForm = form_1;
     for(z=0; z<theForm.length;z++){
      if(theForm[z].type == 'checkbox'){
      theForm[z].checked = true;
      }
    }
}
 
function uncheckAll() {
    var theForm, z = 0;
    theForm = form_1;
     for(z=0; z<theForm.length;z++){
      if(theForm[z].type == 'checkbox'){
      theForm[z].checked = false;
      }
    }
}
</SCRIPT>

You need to create an account or log in to post comments to this site.