"Stijn Goris" <me*****@hotmail.com> wrote:
How can I create a
groep of checkboxes that are somehow linked in a way the user can only
select maximum 3 numbers?
I have a reusable library called "CheckboxGroup" which will do exactly this.
You can assign all the checkboxes to a group, and then limit the number of
boxes that can be checked. If you try to check more than the limit, it will
alert a message and not allow you to do so.
http://www.mattkruse.com/javascript/checkboxgroup/
Be aware, though, that you should also validate this on the server-side,
too, because someone may disable javascript in their browser and then be
able to pick as many as they want.
--
Matt Kruse
Javascript Toolbox:
http://www.mattkruse.com/javascript/