Does anyone know of a way to auto format a number, like SS number. so while the user is typing the number in the textbox, after the first 3 digits, the Dash would appear, etc. bev
you will have to use client side scripting like javascript or vbscript. When the content of the field changes you would then run your script function to format it.
You'd have to do it with client-side code obviously. Probably use the KeyDown or KeyUp event to evaluate the length of the current string and insert or remove the dash as necessary. The onChange event of the textbox won't work because you won't be tabbing off
of it. You'll probably have to check at each keypress, if the textbox has focus, then evaluate the string and see what to do with it.
bevharris
Member
380 Points
76 Posts
format text box fields
Nov 18, 2003 06:34 PM|LINK
TheNige
Participant
1475 Points
295 Posts
Re: format text box fields
Nov 18, 2003 07:36 PM|LINK
PDraigh
Contributor
3550 Points
710 Posts
Re: format text box fields
Nov 18, 2003 07:38 PM|LINK
mhawley
Participant
1314 Points
230 Posts
Re: format text box fields
Nov 18, 2003 11:41 PM|LINK