Login or Sign Up
Logging in...
Remember me
Log in
Or
Sign Up
Forgot password or user name?
Log in with
Search in titles only
Search in Javascript only
Search
Advanced Search
Forums
BYTES
Product Launch
Updates
Developer Toolkit
Today's Posts
Member List
Calendar
Home
Forum
Topic
Javascript
validate phone numbers
Collapse
X
Collapse
Posts
Latest Activity
Photos
Page
of
1
Filter
Time
All Time
Today
Last Week
Last Month
Show
All
Discussions only
Photos only
Videos only
Links only
Polls only
Events only
Filtered by:
Clear All
new posts
Previous
template
Next
lolodede
New Member
Join Date:
Apr 2009
Posts:
63
#1
validate phone numbers
Apr 13 '09, 04:28 AM
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
dmjpro
Top Contributor
Join Date:
Jan 2007
Posts:
2476
#2
Apr 13 '09, 04:42 AM
See to validate the phone number use regular expression.
Did you read out the documentation of regular expression?
Comment
Post
Cancel
lolodede
New Member
Join Date:
Apr 2009
Posts:
63
#3
Apr 13 '09, 04:59 AM
i dont want to validate phone numbers i want to alert user if he didnt put any of three contact numbers
Comment
Post
Cancel
dmjpro
Top Contributor
Join Date:
Jan 2007
Posts:
2476
#4
Apr 13 '09, 06:05 AM
Show us the code what you tried so far?
Comment
Post
Cancel
lolodede
New Member
Join Date:
Apr 2009
Posts:
63
#5
Apr 13 '09, 06:09 AM
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
Comment
Post
Cancel
anubhavjha
New Member
Join Date:
Jul 2008
Posts:
22
#6
Apr 13 '09, 06:57 AM
try to check using if condition like
Code:
if(ph1.val||ph2.val||ph3.val) { //send the request; } else{//stop the request;}
Last edited by
Dormilich
;
Apr 13 '09, 06:58 AM
.
Reason:
added [code] tags
Comment
Post
Cancel
Dormilich
Recognized Expert
Expert
Join Date:
Aug 2008
Posts:
8694
#7
Apr 13 '09, 06:57 AM
this
and
this
tutorial seem to be a good start.
Comment
Post
Cancel
Previous
template
Next
Working...
Yes
No
OK
OK
Cancel
👍
👎
☕
Comment