|
|
|||||||||
|
|||||||||
|
|||||||||
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Display Modes |
|
|
|
Ajax Application Generator Generate database and reporting .NET Web apps in minutes. Quickly create visually stunning, feature-rich apps that are easy to customize and ready to deploy. Download Now!
|
|
#1
|
|||
|
|||
|
Hello there,
I am developing a feedback form in DW MX, which is to have many checkboxes. I want to create twelve check boxes underneath oneanother, which the user can tick/untick as he/she sees fit. However, I also want a main checkbox on top of the other checkboxes which can be ticked and when this main checkbox is ticked then all twelve checkboxes are automatically ticked. How is that developed? I want the users to have the obtion of ticking off the main checkbox, which ticks all of them as well as allowing the users to tick as little or many as they like. If you can provide an example with just three boxes, where one is the main checkbox and controls the other two - then I will be really pleased. Perhaps you can refer to a tutorial or provide the code? Cheers, WebMAD |
|
#2
|
||||
|
||||
|
http://www.js-examples.com/example/?ex=602&mode=1
Note: this site has pretty much every conceivable JS solution... I've used it for years and it has never let me down. I actually just implemented this myself on a client's site: http://www.timber.net.au/search.asp - feel free to have a look @ the source. |
|
#3
|
|||
|
|||
|
Once you know how it isnt too hard,
in a form, there is elements for each form item (checkbox, text, textarea, select, etc). To select all the checkbox elements in a particular form, you would use a function something like this: PHP Code:
this is the function you would use, then in the checkbox that selects all, you would place the following arg onClick="CheckAll(this.checked);" |
![]() |
| Viewing: Dev Articles Community Forums > Programming > JavaScript Development > checkboxes |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|
|