The Web Design Group

... Making the Web accessible to all.

Welcome Guest ( Log In | Register )

 
Reply to this topicStart new topic
> Disable the Comma key in a aspx page
krish
post Oct 17 2006, 08:42 AM
Post #1


Newbie
*

Group: Members
Posts: 10
Joined: 27-September 06
Member No.: 244



Hi All,


How to disable Comma key press in a aspx page using java script?

Thanks

User is offlinePM
Go to the top of the page
Toggle Multi-post QuotingQuote Post
Christian J
post Oct 17 2006, 09:42 AM
Post #2


.
********

Group: WDG Moderators
Posts: 8,206
Joined: 10-August 06
Member No.: 7



http://www.javascriptkit.com/javatutors/javascriptkey.shtml might help, though it seems Windows Opera8+ returns keycode number 44 for the comma key on my computer while IE6 and Firefox return number 188. Don't know if other OSs are different. Then there's the comma key on the num pad.

And you must still check the submitted data in the server-side script, in case the user has disabled javascript in the browser.
User is offlinePM
Go to the top of the page
Toggle Multi-post QuotingQuote Post
Darin McGrew
post Oct 17 2006, 12:03 PM
Post #3


WDG Member
********

Group: Root Admin
Posts: 8,311
Joined: 4-August 06
From: Mountain View, CA
Member No.: 3



And of course, there are other ways to input a comma character.
User is offlinePM
Go to the top of the page
Toggle Multi-post QuotingQuote Post
Brian Chandler
post Oct 18 2006, 07:45 AM
Post #4


Jocular coder
********

Group: Members
Posts: 2,298
Joined: 31-August 06
Member No.: 43



QUOTE(krish @ Oct 17 2006, 10:42 PM) *

Hi All,


How to disable Comma key press in a aspx page using java script?

Thanks


Strictly, you can't "disable" any key. If you told us what you are really trying to do, you might get a better answer...

User is offlinePM
Go to the top of the page
Toggle Multi-post QuotingQuote Post

Reply to this topicStart new topic
2 User(s) are reading this topic (2 Guests and 0 Anonymous Users)
0 Members:

 



- Lo-Fi Version Time is now: 23rd August 2019 - 11:50 PM