File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Populating a character while entering value in text field

 
Shrikanth Nekkanti
Ranch Hand
Posts: 48
  • 0
  • 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
  • 0
  • 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:
==========================
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic