aspose file tools*
The moose likes HTML, CSS and JavaScript and the fly likes event.keyCode for decimal or Period not being validated Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Java 8 in Action this week in the Java 8 forum!
JavaRanch » Java Forums » Engineering » HTML, CSS and JavaScript
Bookmark "event.keyCode for decimal or Period not being validated" Watch "event.keyCode for decimal or Period not being validated" New topic
Author

event.keyCode for decimal or Period not being validated

Vishal Hegde
Ranch Hand

Joined: Aug 01, 2009
Posts: 1050

Hi,

Below is the if Condition I have used



But not sure for what reason decimal point and period is not being typed with i do keydown.


http://www.lifesbizzare.blogspot.com || OCJP:81%
Vishal Hegde
Ranch Hand

Joined: Aug 01, 2009
Posts: 1050

Dear Bear,

I wrote the above mentioned code snippet in the below jquery keydown function and added the keycode

Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 60071
    
  65

If you are using jQuery, you should be using event.which to check keys.


[Asking smart questions] [Bear's FrontMan] [About Bear] [Books by Bear]
Vishal Hegde
Ranch Hand

Joined: Aug 01, 2009
Posts: 1050

Bear Bibeault wrote:If you are using jQuery, you should be using event.which to check keys.


Dear Bear,

Its working. I was going to the wrong JSP page.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: event.keyCode for decimal or Period not being validated
 
Similar Threads
Implementing auto-tabbing
How to make a count down of Characters in a textbox?
Problem With Ctrl C/V in Firefox after validating an input
only allow user to enter two digits after decimal
How to disable Backspace button in IE using JavaScript?