Quote:
Originally Posted by phpmel
Hi all,
I wanted to find out something.
If you have an input box on an html form and you wanted it to operate as follows.
It will be used to enter a phone number with no dashes. The phone number can have 10,11,even 15 digits(different parts of the world).
I wanted the input box to have the digits 1868 in the beginning of the box and let the curser be after the last 8 digit when the box gets focus so that the user could enter the other numbers after 1868 for local calls.Otherwise, The user could press backspace and delete the 1868 digits for international calls and type the entire international call number.
Is this possible at all?
Well, one thing you could do is give your input box a
pre-defined "value" using the value option to the input tag. This way, as you wanted, if it is to be different, then the user could just delete it.
Regards,
Jeff