title: Capturing the tab key using JavaScript in Firefox
body: <p>I use the following to restricts user to enter only some characters.
  When I press tab, the cursor does not point to next control (in Mozilla). But it works fine in IE. </p>
  
  <pre><code>// Restricts user to enter characters other than a to z, A to Z and white space( )
  // Rauf K. 06.11.2010
  $("input:text.characters_only").keypress(function(e) {
  if (!((e.which &gt;= 65 &amp;&amp; e.which &lt;= 90) || (e.which &gt;= 97 &amp;&amp; e.which &lt;= 122) || e.which == 32 || e.which == 8 || e.which == 9)) {
          return false;
      }
  });
  </code></pre>