I am new to JS. Please help me resolving the issue.
<tr>
<td align="CENTER">
<input type="SUBMIT" onclick="validate();location=www.somethg.com" value="Update">
</td>
<td align="LEFT">
<input type="BUTTON" value="Reset " onclick="reset()">
</td>
</tr>
Above code is a small piece taken which shall validate on click and will switch to location "somethg".
But i want if validate returns false then only after pressing update it should go to that location else not. How to add this condition. No jquery please.
reset()andvalidate()