Code Newbie
News     Forums     Search     Members     Sign Up    

My Code Newbie
Username

Password

Articles/Snippets
ASP Classic
ASP.NET
C
C#
C++
HTML / CSS
Java
Javascript
Linux / BSD
Perl
PHP
Python
Ruby
SQL
VB 6
VB.NET

C.N. Friends
  Planet Rome

Link to Us!
Code Newbie
  Code Newbie
    html
  » Select All Checkboxes Button
      by falsepride
 Page 1 of 1 
   

(Login to remove green text ads)
When making a form for a list of files for example, you might want to put a check box next to each file and delete the selected files. If you want to select all of the checkboxes in one form, you can make a select all button by doing:

HTML Code:
<SCRIPT LANGUAGE="JavaScript"> document.deleteform.allbox.onclick = un_check; function un_check(){ for (var i = 0; i < document.deleteform.elements.length; i++) { var e = document.deleteform.elements[i]; if ((e.name != 'allbox') && (e.type == 'checkbox')) { e.checked = document.deleteform.allbox.checked; } } } </SCRIPT>
You should replace deleteform with the name of your form, and allbox with the name of your select all check box




 
 Page 1 of 1 
   

Rate This Article
1 2 3 4 5 6 7 8 9 10





Copyright © 2000-2006, Milano Interactive
Web Hosting provided by Portal 360 Web Hosting
Open Circle