By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
424,850 Members | 1,962 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 424,850 IT Pros & Developers. It's quick & easy.

PHP formMail Phone input

P: 3
I am creating a formmail page and on the input for the phone number I want the form to be slit in three sections for area code, first three digits and last four digits. The catch is, I wan the cursor to jump from the first input area to the second input area when the user is inputting the number without clicking tab. Hope that makes sense.
Oct 10 '08 #1
Share this Question
Share on Google+
6 Replies


Markus
Expert 5K+
P: 6,050
This can't be done with PHP. Javascript, however, will do this beautifully.

Moving you there.
Oct 10 '08 #2

P: 3
could you possibly direct me to the java or php possibilities?
Oct 10 '08 #3

pbmods
Expert 5K+
P: 5,821
Heya, Rico.

I'd strongly recommend against that, as this makes it harder for Users to enter data (see #9 in that list).
Oct 10 '08 #4

P: 3
I found some Javascript to complete it thanks to everyone who helped. THanks pbMods for the info. I'll try to convince my client not to use it.
Oct 10 '08 #5

pbmods
Expert 5K+
P: 5,821
I'll try to convince my client not to use it.
I wish you luck with that. If your client is willing to listen to reason, guard him jealously; he is one of a rare breed :P
Oct 10 '08 #6

acoder
Expert Mod 15k+
P: 16,027
In case someone comes across this thread and has a legitimate reason for this, use the onkeyup event to check the length of the string input is equal to the maxLength property of the text box. If it is, focus on the next text box.
Oct 11 '08 #7

Post your reply

Sign in to post your reply or Sign up for a free account.