title: keypress event is not getting fired when i press enter key
body: <p>I have attached a keypress event to my textbox. when the user presses other keys i am doing some processing work, but when the user presses the Enter key i am submitting the value in the textbox to some server. I am able to do all processing and every thing is fine, but when i press enter key the event is not getting fired. so, i ma unable to submit my value to the server.</p>
  
  <p>Here is my code:</p>
  
  <pre><code>$("#txt" + filterID).keypress(txtInput_keypress);
  
  function txtInput_keypress(e) { 
      var code = (e.keyCode ? e.keyCode : e.which);
      var strValue = $(this).val()+ String.fromCharCode(e.which);
      var bool = $.trim(strValue).match(reg); 
      if (code == 13) {  
          //textbox value submission code
      }
      else if (parseFloat($.trim(strValue)) &gt; max) {
          e.preventDefault();
      }
      else if (bool) {  
          return true;
      }
      else {
          e.preventDefault();
      }  
  } 
  </code></pre>
  
  <p>whats wrong with my code? Please somebody help me to fix this issue.</p>