Win a copy of Functional Reactive Programming this week in the Other Languages forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

help :::Allow user to enter only numeric value

 
Sanjay pts
Ranch Hand
Posts: 357
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello
can anybody tell me how i should enable user to enter only numeric value for html field telephone number.
I have a one text field in which i have to enable user to enter only numeric value, means not allow him to enter alphbetics.If user press letter 'a' to 'z' or any extra character it should not display on text box.Please send me this code.
Thanx
sanjay Patel
 
Joe Paolangeli
Ranch Hand
Posts: 73
 
Sanjay pts
Ranch Hand
Posts: 357
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I had gone through the link, that code works fine into IE but not with NS. please help me out if you know the code for both browser.
Thanx
sanjay patel
 
Yuriy Fuksenko
Ranch Hand
Posts: 413
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
What you actualy wanna do, is handle onKeyPress event. It is different for IE 4/5, NS4 and NS6. Check out http://webreference.com/js/. (I don't want retype it.)
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic