[Javascript] Javascript or ASP.Net - Input Mask for Text BoxthenAuto Tab
David Lovering
dlovering at gazos.com
Mon Mar 24 13:25:25 CST 2003
In the 'phone number' box you type in any legitimate phone number (8375260421), and it automaticly inserts the dashes between the fields, using a canonical phone template ###-###-####. If you type too many digits, or a non-numeric character which doesn't match the syntax, it gooses you or throws it away if it is a redundant delimeter. Obviously the same mechanism could be generalized to dates using slashes, providing that the regexp masks are changed accordingly.
Ditto with the toll-free field, except in this example only 800 and 888 prefixes are accepted. Again, this was only a prototype.
Does that explain it?
-- Dave Lovering
----- Original Message -----
From: Chris Tifer
To: [JavaScript List]
Sent: Monday, March 24, 2003 12:21 PM
Subject: Re: [Javascript] Javascript or ASP.Net - Input Mask for Text BoxthenAuto Tab
I just tested this and it alerts me every time I try to press a key. What's allowed with this script?
----- Original Message -----
From: David Lovering
To: [JavaScript List]
Sent: Monday, March 24, 2003 2:14 PM
Subject: Re: [Javascript] Javascript or ASP.Net - Input Mask for Text Box thenAuto Tab
A piece of cake. I did a similar "dynamic filter" for phone numbers and toll-free numbers a while back, and I'm enclosing the code I did it with. If you speak 'reg-ex' the masks themselves should be self-explanatory, and if not, drop me a line and we'll over it in detail. [The thing is semi-customized for IE6+, but it wouldn't take much to make it viable under Netscape].
-- Dave Lovering
-- dlovering at gazos.com
----- Original Message -----
From: Binkley, Tammi
To: 'javascript at LaTech.edu'
Sent: Monday, March 24, 2003 10:46 AM
Subject: [Javascript] Javascript or ASP.Net - Input Mask for Text Box then Auto Tab
Using ASP.Net, I'm trying to add an input mask to several Text Boxes which are date fields. We want the date to appear "mm/dd/yyyy" in which the user would only enter the actual numbers and the input mask would insert the "/". Once this is achieved the function should auto tab to the next field. I actually have a function for the auto tab which works perfectly for ASP.Net, I am however, having a hard time figuring out how to insert the "/" into the field. Any suggestions?
Tammi Binkley
Information Technology
Missouri Secretary of State Office
600 West Main Street
Jefferson City, MO 65101
573-526-1242
binklt at sosmail.state.mo.us
--------------------------------------------------------------------------
_______________________________________________
Javascript mailing list
Javascript at LaTech.edu
https://lists.LaTech.edu/mailman/listinfo/javascript
----------------------------------------------------------------------------
_______________________________________________
Javascript mailing list
Javascript at LaTech.edu
https://lists.LaTech.edu/mailman/listinfo/javascript
------------------------------------------------------------------------------
_______________________________________________
Javascript mailing list
Javascript at LaTech.edu
https://lists.LaTech.edu/mailman/listinfo/javascript
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.evolt.org/pipermail/javascript/attachments/20030324/86b16c4e/attachment.htm>
More information about the Javascript
mailing list