limiting the number of checkboxes checked
Posted 13 September 2006 - 01:12 AM
I'm trying to limit the number of checkboxes a user can check. Need the limit to be dynamic but for testing purposes I'm trying to do it with a fixed number.
the checkboxes look like this
<input type="checkbox" name="winner" value="'.$row['username'].'">
is there any way of doing that if the name of the checkbox is an array? It really needs to be like that.
Posted 18 September 2006 - 05:27 PM
Posted 19 September 2006 - 06:11 PM
Posted 20 September 2006 - 10:23 AM
Posted 20 September 2006 - 12:48 PM
-iterate through all form elements
-check each element for trailing ""
-iterate though the elements .length
-count the times .checked is true
-validate against "allowed" number
0 user(s) are reading this topic
0 members, 0 guests, 0 anonymous users