I have a form with two sets of flags. The first is a list of roles in the committee (chairman, deputy chairman, secretary, etc.). The second set of flags is a list of people in these roles. For example, Todd is our vice chairman, and Gwen is our treasurer. If I want Todd's checkbox selected when I click on the Vice Chair checkbox, I can do this:
$('input[name=toddS]').attr('checked', true);
But if I want to select our treasuer, I want him to not only set the Gwen checkbox, but also uncheck Todd (and all the other selected checkboxes). How can I do this so that no matter what people check, it leaves only the person or people in this role are checked and leave all the remaining flags unchecked. It is clear? I hope so.
Scott
source
share