473,320 Members | 2,124 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,320 software developers and data experts.

validate phone numbers

i have three phone numbers fields and i only need to let the user enter one of them then the form submit but if te user didnt enter any number then the submit stopped
thanks
Apr 13 '09 #1
6 1914
dmjpro
2,476 2GB
See to validate the phone number use regular expression.
Did you read out the documentation of regular expression?
Apr 13 '09 #2
i dont want to validate phone numbers i want to alert user if he didnt put any of three contact numbers
Apr 13 '09 #3
dmjpro
2,476 2GB
Show us the code what you tried so far?
Apr 13 '09 #4
i dont have any code im new to javascript thats why im asking i serached and i read two books but i cant find it
thanks
Apr 13 '09 #5
try to check using if condition like
Expand|Select|Wrap|Line Numbers
  1. if(ph1.val||ph2.val||ph3.val)
  2. {
  3. //send the request;
  4. }
  5. else{//stop the request;}
Apr 13 '09 #6
Dormilich
8,658 Expert Mod 8TB
this and this tutorial seem to be a good start.
Apr 13 '09 #7

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

Similar topics

5
by: joemono | last post by:
Hello everyone! First, I appologize if this posting isn't proper "netiquette" for this group. I've been working with perl for almost 2 years now. However, my regular expression knowledge is...
4
by: Brian Henry | last post by:
I have phone numbers like this in a data table 123-435-1234 1231231234 432.234.2321 they all have different formatting, what I want to do is get them all formatted like this (123) 123-1234
7
by: Dragon | last post by:
Hi, I am trying to find out if there is a good (Built-in?) way to validate text input. I would like to check a textbox to see whether user enter a proper name (without numbers, symbols etc) or...
2
by: Neo Geshel | last post by:
Greetings, I have a form with a telephone field. It is very specific, as it has four text boxes - the country code, area code, prefix and suffix. I can validate each of them individually, but...
2
uranuskid
by: uranuskid | last post by:
Hey folks, I'd like to validate phone number field. Any number in the formate xx-xxx-xxx(xx) is supposed to pass the test (where x in brackets are optional). Here is what i used, but it doesn't...
1
by: SkipNRun | last post by:
I am a novice when comes to JavaScript, AJAX. I am working on a form, which will allow users to update their contact information. In order to make the form flexible, I need to use pull down list. ...
5
by: lim4801 | last post by:
I am currently in doing a program which is given by my tutor: Contemplate that you are working for the phone company and want to sell "special" phone numbers to companies. These phone numbers are...
5
by: Abhishek | last post by:
Hi this is my another validator in javascript to validate the Phone Number :-) <script language='javascript'> function funcCheckPhoneNumber(ctrtxtMobile,e){ if(window.event){ var strkeyIE =...
5
by: ghjk | last post by:
I have a web site with several web pages. They are having different number of variables. eg: first page having 4 variables in the form(Name, Phone, ID, Gender) second page having 10 variables in the...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
0
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.