title: Firefox issue with onkeypress and charCode
body: <p>I am trying to restrict the user to enter only numbers in a text box</p>
  
  <pre><code>&lt;input type="text" name="pQ[]" onkeypress=" return checkKeyVal(event)"/&gt;
  
  function checkKeyVal(ev)
  {
      if(ev.keyCode)
      {
          if(ev.keyCode&lt;48 || ev.keyCode&gt;57)
          {
              return false;
          }
      }
      else
      { 
          //For Firefox
          if(ev.charCode&lt;48 || ev.charCode&gt;57)
          {
              return false;
          }
      }
  }
  </code></pre>
  
  <p>I found out that keyCode does not work firefox so i added charCode. The problem now is that none of other keys like backspace,  delete and arrow keys seem to be working in firefox</p>