I have a search form that lets the user search for the specific features that he checks, or displays all products if the "Any" checkbox is checked. What I need Javascript to do is, to uncheck the "Any" checkbox, if the user checks any of features checkboxes. And also the other way around, if the user checks the "Any" checkbox, it should automatically uncheck all the other features checkboxes.
Basically, when the user checks one checkbox, another should get unchecked (like with radio buttons).
It should be simple, but what I've tried so far did absolutely nothing, except for raising my blood pressure.
Here is the source of my form:
Basically, when the user checks one checkbox, another should get unchecked (like with radio buttons).
It should be simple, but what I've tried so far did absolutely nothing, except for raising my blood pressure.
Here is the source of my form:
Code:
<form method="get" name="searchForm" action="/mysite/admin.php">
<table class="smallcell" align="center" bgcolor="#ffffcc" border="0">
<tbody><tr>
<td>Features:</td>
<td><input checked="checked" name="any" onclick="uncheck()" type="checkbox">Any
<input name="features[]" value="1" type="checkbox">Flip phone
<input name="features[]" value="2" type="checkbox">Bluetooth
<input name="features[]" value="3" type="checkbox">Color screen
<input name="features[]" value="4" type="checkbox">GSM
</td>
</tr>