title: Stop form submission and keep form values
body: <p>I have added a validation check on my form submission but problem is that it stopped the form from being submitted but it also reset my whole form. Kindly let me know how can i on <code>return false</code> also stop the form submission and stop resetting the whole form. Thanks</p>
  
  <pre><code>function error()
  {
     if (!$("#form1 input[name='radio']:checked").val()) {
       alert('Error: Please select any check box!');
       return false;
     }
     else {
       //alert('One of the radio buttons is checked!');
     }
  }
  
  &lt;form name="form1" id="form1"&gt;
    &lt;input name="Name" type="text" id="name" size="70" /&gt;
    &lt;input name="Age" type="text" id="age" size="70" /&gt;
    &lt;input type="radio" name="radio" id="A18" value="18" /&gt;
    &lt;input type="radio" name="radio" id="A19" value="19" /&gt;
    &lt;input type="submit" onclick="error();" /&gt;
  &lt;/form&gt;
  </code></pre>