I want to uncheck these boxes on pressing my clear button. Form.reset doesn't work. Not does getelementbyid.checked = false
.
Here is how I have checked them
<input type="checkbox" name="free" <?php echo empty($_POST['free']) ? '' : ' checked="checked" '; ?>>Free Shipping<br>
This is the clear button:
<input type="reset" value="clear" onclick="clearform()" style="float:right; width:80px; margin-right:5px;">
This is the function:
function clearform()
{
document.getElementById("results").innerHTML = "";
document.getElementById("results").style.visibility = "hidden";
document.getElementById("searchform").reset();
}