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 IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Create a mask in a textbox of a form

Status
Not open for further replies.

Bibi

Programmer
Nov 8, 2000
10
CA
Hello!

How can I create a mask in a textbox of a form?

Thank you in advance!
 
A mask format the output of a data. For example, the format of a date is MM/DD/YYYY. In the textbox, you see " / / ". When you enter the date, you don't enter the caracters "/". After that you enter the month, the cursor go the first caracter of the day. After that you enter the day, the cursor go the first caracter of the year.
 
Well, you would write a javascript function that would probably be called onKeyUp for that box that would read, parse, and reformat the string each time it was/is typed in. There's not a quick and easy way to do it, like there is for other Windows programs or anything. :-(

However, you might very well be able to find a widget for that somewhere at a site like or any of the host of other dhtml/javascript sites out there. That's probably where I'd start looking.

good luck! :)
Paul Prewett
penny.gif
penny.gif
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top