onchange on checkboxes fires n times

onchange on checkboxes fires n times

Hello,

I have a problem. I have a series of 6 checkboxes with the same name.
The purpose is that whenever one of these is checked or unchecked, another part of the page is filled again based on an AJAX query, that has the values of all the checked checkboxes as input.

I added an onchange event handler like this:
  1. $('[name!=stage]').change(refillActionsParameters);
what happens is that this handler function gets called 6 times when I check or uncheck any of the checkboxes.
As a remedy, I put the onchange handler on the form that contains the checkboxes, but that didn't help, still 6 times.

How can I fix that?


Also: is there a quick way to retrieve the values or the ids of the checked boxes?

Thanks.