title: How do i stop the form from reloading using Javascript?
body: <p>When a User Submits the form i want to stop the default behavior of the form. ie it should not reload. so that i can perform the AJAX request.</p>
  
  <p>here is the code i used.</p>
  
  <pre><code>&lt;script type="text/javascript"&gt;
      function validateForm()
      {
          return false;
      }
  &lt;/script&gt;
  &lt;form action="" name="contact" onsubmit="validateForm();"&gt;
      &lt;input type="text" name="name" value="Enter Your Name..."/&gt;
      &lt;input type="submit" name="submit"/&gt;
  &lt;/form&gt;
  </code></pre>
  
  <p>this does not stop the form from being submitted or reloaded. how do i achieve this?</p>