kiwistag
asked on
Select all checkboxes on a page in a specific section
I have a site where on it is a range of checkboxes. All have different names and values, and are housed in a single table.
I am after a script that will allow me to select all checkboxes in this range without interfering with the others on the same page if possible. So far it's been all on the page or nothing...
Maybe if it could run by the Table name/ID or if I set all checkboxes to have the same ID, it could help...
Code samples/examples would be appreciated.
I am after a script that will allow me to select all checkboxes in this range without interfering with the others on the same page if possible. So far it's been all on the page or nothing...
Maybe if it could run by the Table name/ID or if I set all checkboxes to have the same ID, it could help...
Code samples/examples would be appreciated.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Sorry, forgot to include jQuery. Yes! That worked perfectly - thank you :)
You're welcome. Thanks for the points.
Giving all the checkboxes the same id is NOT an option, but you could give them the same name or the same class and access them that way.
Or, if they all appear in a specific column of a table you can access them like:
Open in new window