Synchronizing checkboxes

hi.

i have a problem with two forms in which 10 checkbox items should be snychronized from one to the other interaction. Means, if in the upper list I check item #1, I want to have in the bottom list, which contains almost the same items (same amount of checkboxes) the first item checked automatically.
I try to match the items in the script via classes.

I have a custom code with java script embedded after the forms.

Any ideas, why it would not work?

If these are static checkboxes ( not CMS-generated ), you could use Finsweet’s mirror-click.

Otherwise, with custom code, I’d use custom attributes rather than classes. Something like;

checkbox-sync = abcd

You’d give every syncable checkbox this attribute, and give all the synchronized ones the same name.

Your custom code would;

  • On DOM load, find all of these and install a click handler
  • On click, would get the current checkboxes new state, and its checkbox-sync identifier. Then find all others and set their checked state to match.

Awesome… somehow it worked finally.
More or less with attributes.

Thx Michael