>
>Just to be a fly in your ointment, what about the following scenario - user
>enters a full zip (hyphen gets inserted), then selects and deletes the first
>4 chars... first, does the hyphen adjust somehow, and second, will you get
>another hyphen when the user resumes typing? Users do the damndest things.
>Thought I'd point this possibility out in case it slipped by you (I hate
>that 5-hole).
>
>2 hyphens,
>Kurt
>

I'm using strong fly-paper!

The part of the algorithm that I didn't post is this:  On each 
keystroke, I take the text of the field, strip out any hypens that 
got in there from the last keystroke, then, if the resulting string 
has more than 5 chars I make the final string the first 5 chars, a 
hyphen, then the rest of the chars, else, just the string that's 
there.  Seems to work!

I'll see your 2 hyphens and raise you a semi-colon,

Irv
-- 

Lingo / Director / Shockwave development for all occasions. 
          
   (Home-made Lingo cooked up fresh every day just for you.)
[To remove yourself from this list, or to change to digest mode, go to 
http://www.penworks.com/lingo-l.cgi  To post messages to the list, email 
[EMAIL PROTECTED]  (Problems, email [EMAIL PROTECTED]). Lingo-L is for 
learning and helping with programming Lingo.  Thanks!]

Reply via email to