disabling a group of checkboxes

admin

Administrator
Staff member
I'm working on an assignment entry page for my son's school.

My example:
If a teacher teaches 3 sections of 10th grade history and 3 sections of 11th grade history, and wants to entry assignments for his 10th grade class, I want him to be able to select the 10th grade radio button and any or all of the check boxes next to the class sections. I also want the checkboxes next to the 11th grade sections to be disabled. Like this:


O 10th grade US History [] section 01
[] section 02
[] section 03

O 11th grade US History [] section 01
[] section 02
[] section 03


I'm looking around to see if I can find something similar before I spend a huge amount of time writing a script. I'm not my of a JavaScript programmer. I'm much stronger in PHP, though I'm just learning that as well.

The site is written in PHP, using a mySQL database and these lists are dynamically generated, so the javascript to disable the button will also have to be dynamically generated.

I know this can be done, just not sure where to start. I do okay changing up someone elses scripts if they aren't too complicated.

Any ideas, suggestions, tip???
 
Top