title: Disable the enter key on a jquery-powered form
body: <p>I have a form using the form jQuery plug in to handel the posting of the data. In the example i am working with the data is psoted to another php file which reades a database and echos back a result which is displayed below the from.</p>
  
  <p>The code works very well with one glitch. If you hit the enter button while the text filed is selected everything cleared including the result that has been written to the screen. Is it possible to disable to enter key and prevent it from doing this?</p>
  
  <p>FORM:</p>
  
  <pre><code>&lt;html&gt;
  &lt;head&gt;
  &lt;/head&gt;
  &lt;p&gt;enter code here
  &lt;form name="form" action="" method=""&gt;
    &lt;label for="name" id="name_label"&gt;Name&lt;/label&gt; 
    &lt;input type="text" name="name" id="name"/&gt;
    &lt;input type="button" value="get" onclick="get();"/&gt;
  &lt;/form&gt;
  
  &lt;div id="age"&gt;&lt;/div&gt;
  &lt;/p&gt;
  &lt;/body&gt;
  &lt;/html&gt;
  </code></pre>
  
  <p>SCRIPT:</p>
  
  <pre><code>function get() {
      $.post('data.php', {name: form.name.value},
          function(output) {
              $('#age').hide().html(output).fadeIn(1000);
          });
      }
  }
  </code></pre>
  
  <p>Cheers.</p>