how to cutomize a textbox

JavaScript and client side scripting.

Moderator: General Moderators

Post Reply
bugthefixer
Forum Contributor
Posts: 118
Joined: Mon Mar 22, 2004 2:35 am

how to cutomize a textbox

Post by bugthefixer »

I have a field for ph no that accepts this format

+(256)41-200-222

how can i make a textbox according to this format like

+( _ _ _ ) _ _ - _ _ _ - _ _ _

so that the user can only fill the blanks with numbers......... any help wud be greatly appreciated
User avatar
n00b Saibot
DevNet Resident
Posts: 1452
Joined: Fri Dec 24, 2004 2:59 am
Location: Lucknow, UP, India
Contact:

Post by n00b Saibot »

you can do three things :arrow:

1. have user input 11 nos. total without formatting and format it yourself [best opt].
2. have a separate input box for each fragment of phone no. [so so]
3. have a javascript format the input on each key-press [least good]

your choice :wink:
Post Reply