[solved] How to handle an 'any' checkbox with Javascript?? [inc example] |
[eluser]umbongo[/eluser]
How can i make my 'any' checkbox deselect when any other checkbox (from the same group) is selected, and reselect when all others are deselected?? (initially selected as default) The behavoir I want can be found at newegg's powersearch (eg http://www.newegg.com/Product/PowerSearc...GASearch=3 )
[eluser]Twisted1919[/eluser]
you can use jquery on this , let's say you have something like : Code: Any : <input type="checkbox" name="product_type" value="any" class="group1" />
[eluser]umbongo[/eluser]
OK i fixed the code so here it is for anyone who might arrive here through google or similar; Code: <skript type="text/javascript">
[eluser]cahva[/eluser]
Target the form's checkboxes in general and get the classname depending whats clicked and act accordingly. Easier to give you the code, check here: http://jsbin.com/omexa4/edit
|
Welcome Guest, Not a member yet? Register Sign In |