[Javascript] Javascript or ASP.Net - Input Mask for Text Box thenAuto Tab

David Lovering dlovering at gazos.com
Mon Mar 24 13:34:50 CST 2003


No, this was a simple demo on an old keyboard.  The key event masks are different for the number keys above the main keyboard than they are for the number pad, but the conditionals could be easily extended to cover even them.  I could probably gen something together that would recognize the number pad, ... if only I had a keyboard WITH a number pad!
[The reason I probably don't has something to do with the fact that different manufacturers use different ROMs in their keyboards, and hence generate slightly different key events.]

I could also modify the script to use a 'watch("keyUp",...) trap instead of an event handler, which should make it generic enough to use both the regular number keys and the number pad keys.  

Is this enough of a hint, or do you want me to tweak the code a bit?

-- Dave Lovering
  ----- Original Message ----- 
  From: Mckinney, Lori K 
  To: [JavaScript List] 
  Sent: Monday, March 24, 2003 12:23 PM
  Subject: RE: [Javascript] Javascript or ASP.Net - Input Mask for Text Box thenAuto Tab


  Are you using the number pad?  I get errors there but not with the number keys.
    -----Original Message-----
    From: Chris Tifer [mailto:christ at saeweb.com]
    Sent: Monday, March 24, 2003 01:21 PM
    To: [JavaScript List]
    Subject: Re: [Javascript] Javascript or ASP.Net - Input Mask for Text Box thenAuto 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/24b74c12/attachment.htm>


More information about the Javascript mailing list