title: javascript onkeydown not working in numeric keypad
body: <p>I am having a problem while entering the number values from the Num pad.My script is only accepting numbers from the number keys above the 'qwerty' keys. What I want is that user can also enter numbers from numeric keypad. Following is the HTML:</p>
  
  <pre><code>&lt;td style="border: 1px solid #ddd;background-color:#E5E4E2;"&gt;
       &lt;input type="text" name="qty_enter[]"  id="qty_enter0" onkeyup="sum(0),itc_details(0),prevent_zero(0),advance_seeting1();" onkeypress="copyValue2(1)" onkeydown="return isNumberKey(event)" style="width: 65px;outline: none;border: none; background: transparent;"/&gt;
  &lt;/td&gt;
  </code></pre>
  
  <p>However I tried to call the script on onkeypress and onkeyup functions but it's not working because I have already called function over there. Here is the script below for only accepting numerical values. 
  Also I have double checked the Num Lock and that's not the issue.</p>
  
  <pre><code>&lt;script&gt;
      function isNumberKey(evt)
             {
                var charCode = (evt.which) ? evt.which : event.keyCode
                if (charCode != 46 &amp;&amp; charCode &gt; 31 
                  &amp;&amp; (charCode &lt; 48 || charCode &gt; 57))
                   return false;
  
                return true;
             }
      &lt;/script&gt;
  </code></pre>
  
  <p>Any help would be appreciated. Thank you.</p>