title: Stop reloading page with 'Enter Key'
body: <p>I have a search box at the top of page that makes an ajax call when a user hits the adjacent button. I am trying to update the input tag so that when a user hit the <em>'enter' key</em>, the apropriate JavaScript takes place <em>without</em> reloading the page. The problem is that the page keeps reloading. Here is my latest attempt:</p>
  
  <pre><code>$("searchText").bind('keyup', function(event){ 
    if(event.keyCode == 13){ 
      event.preventDefault();
      $("#buttonSrch").click(); 
      return false;
    }
  });
  
  &lt;input type='search' id='searchText' /&gt;
  &lt;input type='button' id='buttonSrch' onclick="search(document.getElementById('searchText'))" value='Search' /&gt;
  </code></pre>