Win a copy of The Java Performance Companion this week in the Performance forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Populating a character while entering value in text field

 
Shrikanth Nekkanti
Ranch Hand
Posts: 48
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi all,

I have a text which accepts only numbers.
Now i want to populate a dot(.) automatically after entering three characters in that text field.

How can i resolve this using javascript.
 
Anirvan Majumdar
Ranch Hand
Posts: 261
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Use the "onkeyup" event of the textbox to call a function passing the reference to the textbox => "fnABC(this)"

This function can do something like:
==========================
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic