1

Good evening everyone, I have some issue after adding an ASCII restrictions on my code. I'm implementing a registration form using jsp and javascript and jquery and I want it to accept only English letters, So I added these lines of JQuery code:

       $("#MobileNumber").keypress(function(event) {
                var ew = event.which;

                if (1 <= ew && ew <= 126)
                    return true;

                return false;
        });

So it worked for me perfectly, But unfortunately the tab button only on Firefox browser has been disabled, Although that the ASCII code for the Tab button is "11", So it should return true and it really does on other browsers (Chrome and IE).

So what is the problem here and what would be the solution for it !!

kamel Salah
  • 31
  • 10

0 Answers0