title: prevent form from submitting to a different page
body: <p>I have this code:</p>
  
  <pre><code>&lt;form method="get" action="" id="search"&gt;
  &lt;input id="search_box" name="search" type="text" class='search_box'  onkeypress="if(event.keyCode==13) sentAjax('searchdata.php');var filelink='searchdata.php';"  value="" onclick="this.value=''" /&gt;
          &lt;input type="hidden" name="course_val" id="course_val" /&gt;
  &lt;/form&gt;
  </code></pre>
  
  <p>I want to block the form from submitting to a different page.Now if you hit enter it submits to a different page</p>