title: javascript validation check on click condition from HTML
body: <p>I am new to JS. Please help me resolving the issue.</p>
  
  <pre><code>&lt;tr&gt;
  &lt;td align="CENTER"&gt;
  &lt;input type="SUBMIT" onclick="validate();location=www.somethg.com" value="Update"&gt;
  &lt;/td&gt;
  &lt;td align="LEFT"&gt;
  &lt;input type="BUTTON" value="Reset&amp;nbsp;" onclick="reset()"&gt;
  &lt;/td&gt;
  &lt;/tr&gt;
  </code></pre>
  
  <p>Above code is a small piece taken which shall validate on click and will switch to location "somethg".</p>
  
  <p>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.</p>