Check/Uncheck Multiple Checkboxes | JavaScriptSource

Check/Uncheck Multiple Checkboxes

Brian McAllister Mar 17, 2006

General

This script allows for the selection of multiple checkboxes in a form. It create the buttons dynamically with unobtrusive JavaScript.


Multiple Checkbox Group Test 1

:

:

:

The following checkbox should be left untouched by the check/uncheck action

:

Multiple Checkbox Group Test 2

:

:

:

A second group of checkboxs starts here.

:

:

:

Read the related post to get a better idea of whats going on behind the scenes.

Notes

Source Code

Paste this source code into the designated areas.

External file

Paste this code into an external JavaScript file named: checkBox.js


Head

Paste this code into the HEAD section of your HTML document.


Body

Paste this code into the BODY section of your HTML document


Leave a Response

(2 comments)

Your question is beyond the scope of these comments. You will need to post it over on [a href="http://www.webdeveloper.com/forum/forumdisplay.php?f=3"]the JavaScript forum[/a]. Thanks!

Lee Nov 6, 2008

hi, i have to columns, both columns have multi check box, in between them there is remove and add button, which remove the selected checkboxes from 2nd column to the first column. while the add button, add the selected check boxes from the first column to the second column.[br /][br /]Can yuo help me, on how I can achieve this? Thanks.

Carlos Aug 5, 2008