Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Text box formatting

Status
Not open for further replies.

Guest_imported

New member
Jan 1, 1970
0
Hey Everyone

Could someone tell me if and how it is possible to format a text box everytime a key is pressed, because onblur and onchange only get run when it loses focus, I need it to work for example :
When typing in an amount, it should insert a "." for cents and a "," after every 3 digits after then cents,but it must happen as the user enters the amount.

Thanks
Merry Christmas
 
You may also want to check onkeyup and/or onkeydown, as certain keys don't appear in the onkeypress event (don't ask me why...). jared@eae.net -
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top