wood burning stoves 2.0*
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 Android Security Essentials Live Lessons this week in the Android 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: 1055

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: 1055

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: 60782
    
  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: 1055

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.
 
wood burning stoves
 
subject: event.keyCode for decimal or Period not being validated
 
Similar Threads
How to make a count down of Characters in a textbox?
only allow user to enter two digits after decimal
Problem With Ctrl C/V in Firefox after validating an input
How to disable Backspace button in IE using JavaScript?
Implementing auto-tabbing