Associate
- Joined
- 18 Oct 2002
- Posts
- 710
- Location
- Somerset
I have two groups of checkboxes on a page, one group is small the other is rather larger so i wanted to add a check/uncheck all option to the large group only.
Searched the net and found several javascript options to do this, tried a few but have a few problems.
All the functions i found work on the name of the checkbox, with all in the group needing the same name, or on the form id
form id
As everything in the page was in 1 form i added new form tags to the group of checkboxes (form in a form is that allowed?) and gave it an id, set this to the function, and it will not work.
name
all checkboxes need the same name and the function picks up on this.
Unless i am doing some thing very wrong all my checkboxes have different names which are needed to pass there individual values on when the submit button is clicked so these functions will not work either.
Am i passing the values incorrectly or is there another way of passing them so i can give them all the same name?
Or is there another way to add a check/uncheck all option to a group of boxes?
Does any of that make sense?
Thanks
Searched the net and found several javascript options to do this, tried a few but have a few problems.
All the functions i found work on the name of the checkbox, with all in the group needing the same name, or on the form id
form id
As everything in the page was in 1 form i added new form tags to the group of checkboxes (form in a form is that allowed?) and gave it an id, set this to the function, and it will not work.
name
all checkboxes need the same name and the function picks up on this.
Unless i am doing some thing very wrong all my checkboxes have different names which are needed to pass there individual values on when the submit button is clicked so these functions will not work either.
Am i passing the values incorrectly or is there another way of passing them so i can give them all the same name?
Or is there another way to add a check/uncheck all option to a group of boxes?
Does any of that make sense?
Thanks