title: disable certain keys if text input field exceeds X number of characters?
body: <pre><code>$('.licensetable :text').live('keydown', function (event) {
      if ((event.keyCode &lt; 48 || event.keyCode &gt; 57) &amp;&amp; (event.keyCode &lt; 96 || event.keyCode &gt; 105) &amp;&amp; (event.keyCode != 8)) {
          event.preventDefault();
      }
  });
  </code></pre>
  
  <p>I only allow numbers. This works. But if i log</p>
  
  <pre><code>$(this).val().length
  </code></pre>
  
  <p>Its obviously "one step after". If i bind the keyup event, i get the correct number. But then i cant disable the keypress event. My goal is to disable the input after a certain amount of numbers has been entered. Hope you get the idea. Thanks</p>