title: How to stop page refresh on form submit
body: <p>I have a form which automatically refreshes the page on submit, I have tried adding:</p>
  
  <p><code>onSubmit="return false;"</code> to the form element, but then the form just stops and nothing happens when you click submit.</p>
  
  <p>I wouldnt mind the page refresh so much but the form is at the bottom of the page and the refresh kicks you back to the top. So I tried this approach:</p>
  
  <p><code>&lt;form name='test' method='POST' action="index.php" onSubmit="window.scrollTo(5000,500);"&gt;</code></p>
  
  <p>This works for a split second but then something else overrides it (not sure what)</p>
  
  <p>I have also tried using php: <code>header.location</code> just to get a "headers have already been sent" error.</p>
  
  <p>The site in question can be seen <a href="http://www.kg-stores.com/kineticgroup_website_redesign_working/" rel="nofollow">here</a>, and the form is at the very bottom.</p>
  
  <p>The only two jquery libraries I am using that I could foresee any conflicts with are nicescroll and (more likely) waypoints, but i dug through them both and couldn't find any conflicting issues.</p>
  
  <p>If anyone knows of a way to keep the functionality of the form but stop the refresh of the page, that would be wonderful
  Thanks</p>
  
  <p>EDIT:  After reading the answers below, it looks like I will have to use ajax to acomplish this,  I have absolutely no experience with ajax, so I will see how that goes.  </p>