title: Disabling enter key for form
body: <p>I have been trying to disable the <kbd>Enter</kbd> key on my form. The code that I have is shown below. For some reason the enter key is still triggering the submit. The code is in my head section and seems to be correct from other sources.</p>
  
  <pre><code>disableEnterKey: function disableEnterKey(e){
          var key;      
          if(window.event)
              key = window.event.keyCode; //IE
          else
              key = e.which; //firefox      
  
          return (key != 13);
      },
  </code></pre>