Formatting Phone number in javascript


DevX Home    Today's Headlines   Articles Archive   Tip Bank   Forums   

Results 1 to 2 of 2

Thread: Formatting Phone number in javascript

  1. #1
    Gypzees Guest

    Formatting Phone number in javascript


    I know this sounds stupid but as a beginning programmer I'm not sure on how
    to format a phone number for a textbox the user must type in. I know with
    Vb you use the Format(215-555-1212, "0###") but I am unfamiliar with javascript.
    I guess I need a course and fast.

    Thank you for your help!!!

  2. #2
    Frederiek Guest

    Re: Formatting Phone number in javascript


    Try <http://www.SiteExperts.com/tips/func...ts21/page1.asp> "Form validation
    made easy". Originally found in "Inside techniques". Though the exemple seems
    to "submit" whatever I enter in the phone field, you can see how the set-up
    for checking is done using "regular expressions". Then you'll have to make
    your changes to not submit when the field is not correctly formatted.

    Hope that helps.

    cya
    Frederiek


    "Gypzees" <eurokrft@home.com> wrote:
    >
    >I know this sounds stupid but as a beginning programmer I'm not sure on

    how
    >to format a phone number for a textbox the user must type in. I know with
    >Vb you use the Format(215-555-1212, "0###") but I am unfamiliar with javascript.
    > I guess I need a course and fast.
    >
    >Thank you for your help!!!



Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
HTML5 Development Center
 
 
FAQ
Latest Articles
Java
.NET
XML
Database
Enterprise
Questions? Contact us.
C++
Web Development
Wireless
Latest Tips
Open Source


   Development Centers

   -- Android Development Center
   -- Cloud Development Project Center
   -- HTML5 Development Center
   -- Windows Mobile Development Center