adding text in one field and automatically to another

Phil Davis revdev at pdslabs.net
Thu Oct 27 16:31:32 EDT 2011


I forgot to say - this code goes into the 'area code' field. 'fld 2' is the 
phone number field. And it doesn't deal with pasting values. And... and...
Phil


On 10/27/11 1:19 PM, Phil Davis wrote:
> on keyDown pKey
>     if pKey is an integer
>     then pass keyDown
>     else beep
> end keyDown
>
>
> on keyUp pKey
>     if length(text of me) = 3
>     then select text of fld 2
>     pass keyUp
> end keyUp
>
>
> Phil
>
>
> On 10/27/11 1:08 PM, william humphrey wrote:
>> And now for something very easy.
>>
>> I have two fields (area code and telephone number). I'd like for the first
>> field (area code) to allow three numbers to be entered and then if a fourth
>> number is entered automatically go to the telephone number field and
>> continue adding the rest of the number there.
>>
>> I managed to limit the field to three numbers and go to the next field but
>> the fourth number always gets lost and has to be entered again.
>>
>> Can someone suggest some code for this?  THanks....
>> _______________________________________________
>> use-livecode mailing list
>> use-livecode at lists.runrev.com
>> Please visit this url to subscribe, unsubscribe and manage your subscription 
>> preferences:
>> http://lists.runrev.com/mailman/listinfo/use-livecode
>>
>

-- 
Phil Davis

PDS Labs
Professional Software Development
http://pdslabs.net





More information about the use-livecode mailing list