View Full Version : How to uncheck-disable, remaing checkboxes

01-24-2012, 02:00 PM
I am new here and was going to reply to this post but it warned me not to so I hopefully I can just put the link here
I found this code forums/showthread.php?t=24063 (http://www.dynamicdrive.com/forums/showthread.php?t=24063) and want to see if anyone can help me tweak it please,
I have frames pages and are passing a maxchecks via onclick..
top.frames['Sidebar'].maxchecks=2;top.frames['MainFrame'].location.href=page2.. and that seems to work ok but if page1 link has max limit of 4 and they change to page2 (which has a limit of 2) (total checkboxes=10) it allows them to select or unselect as many as thy want untill the selected boxes is less than the maxchecks then it disables as planned, is there a way to unselect the last boxes that have exceeded the max limit, in this case it would uncheck and disable the last 8 checkboxes,

Any help would be great I am very new to js