I have a form with 3 phone number fields. The user has asked that I preload each field with our local area code so they don't have to enter it.
The problem arises when there is no phone number, they are supposed to press the escape key once to erase the area code and tab to the next field. But if they press the Escape key twice, it deletes all changes to the record on the form. I tried capturing the esc key using the onkeypress event, but then the Escape key does not work at all.
I also tried only putting in the area code when they start entering the phone number of the field, but can't seem to find an event that will work properly.
Thanks.
Denis
Programmer, Canada
The problem arises when there is no phone number, they are supposed to press the escape key once to erase the area code and tab to the next field. But if they press the Escape key twice, it deletes all changes to the record on the form. I tried capturing the esc key using the onkeypress event, but then the Escape key does not work at all.
I also tried only putting in the area code when they start entering the phone number of the field, but can't seem to find an event that will work properly.
Thanks.
Denis
Programmer, Canada