Latest Tutorials| Questions and Answers|Ask Questions?|Site Map



Login         

View Questions and Answers by Category

Advertisements


 
Have Programming Question? Ask it here!
 
 
 


Atanu Paul
Phone no
1 Answer(s)      3 years and 8 months ago
Posted in : JavaScript Questions


I have box where i can only put the number except + . Like +91


Advertisement
View Answers

April 23, 2011 at 12:53 PM


<script>
function checkMobileNumber(number){ 
      if(/[^\d ]/.test(number)){
      alert('It should contain numbers [0-9] only!');
      document.getElementById("st").value="";
      return false;
      }
      if(number.substring(0,2)!="91"){
      alert("Number should begin with 91");
      document.getElementById("st").value="";
      return false;
      }
      if (number.length>12){
      alert("Invalid Mobile Number!It cannot exceeds the limit of 12 digits. ");
      document.getElementById("st").value="";
      return false;
    }
    return true;
}
</script>
Enter Mobile Number:&nbsp&nbsp&nbsp<input type="text" id="st" onkeyup="checkMobileNumber(this.value);">


Related Tutorials/Questions & Answers:
Phone no
Phone no  I have box where i can only put the number except + . Like +91
landline phone
landline phone  write a java code to design a landline phone with as many feature as possible
Advertisements
landline phone
landline phone  write a java code to design a landline phone with as many feature as possible
regular expression for phone number
regular expression for phone number  Hi, i need the regular expression code for phone number in PHP. Thanks.   PHP - regular expression code for phone number \+?([0-9]{2})-?([0-9]{3})-?([0-9]{6,7
code for phone application
code for phone application  I wish to write a small android (or java... button, phone call should be made to that number. It should also allow user... a message, receiver phone number and send SMS when user clicks send button. Program
xcode make phone call
xcode make phone call  xcode make phone call - Our iPhone application required a feature to call over any given mobile or phone number. Just wondering how to enable this feature in my application. Though i have see
VoIP Cell Phone
VoIP Cell Phone Using VoIP with Cell Phone  Before many of us came to rely on cell phones to make long distance phone calls, our only option was to commit to a long distance phone company. Long distance carriers
Get your friends' phone numbers
Get your friends' phone numbers  How to create on update trigger
JSP phone number - JSP-Servlet
JSP phone number  Hi! when i am trying to insert phone number in dbase. Only 9 numbers are inserting. i have given data type as numeric(11,0). I have tried with numeric(12,0). but no use if i give 9 numbers it is going to insert
Mysql Phone Number Format
Mysql Phone Number Format       Mysql Phone Number Format is useful when you want to return the phone number in specific format. Understand with Example The Tutorial
GPS Phone Tracking System
A GPS Phone Tracking system is a system used to determine the location of a stationary or moving Phone using different methods and attain the location coordinates of the phone. GPS Phone Tracking is achieved using the GPS or GPRS
Cell Phone Locator System
Cell Phone Locator System A cell phone locator system is another milestone in the mobile technology. As the name suggests, cell phone locator system is used... to the process of tracking phone devices. Mobile tracking is done with the help
Cell phone GPS tracking
phone. This device avoids unnecessary investment in infrastructure
VoIP Phone Systems
VoIP Phone Systems          Introduction of VoIP Phone Systems Voice over Internet Protocol (VoIP) represents the latest in phone system technology
VoIP USB Phone
VoIP USB Phone          A Corinex VoIP USB Phone A USB phone which can... included in the USB phone packaging to be able to use this software
Phone number validation using regular expression
Phone number validation using regular expression  Explain phone number validation using regular expression in JavaScript.   phone = phone.replace(/[^0-9]/g, ''); if(phone.length != 10) { alert("not 10 digits
extracting phone number n storing in excel
extracting phone number n storing in excel  i need a program to open a doc file n extract phone numbers from it and store it in a excel sheet?? plz do reply and help me out with the problem
extracting phone number n storing in excel
extracting phone number n storing in excel  i need a program to open a doc file n extract phone numbers from it and store it in a excel sheet?? plz do reply and help me out with the problem
What is a WiFi Phone?
What is a WiFi Phone?       Introduction A WiFi phone is a wireless device that gives you the dual.... If there are no obstructions, you will be able to use a WiFi phone within a radius of 300 feet (90 meters
CELL PHONE TRACKING by GPS
Cell phone tracking means knowing the current location of the mobile phone... of that cell phone. Parents use cell phone tracking to know the whereabouts... card is changed, as cell phone identifies itself by IMSI (International Mobile
How to find latitude and longitude of my Mobile Phone?
How to find latitude and longitude of my Mobile Phone?  Hi, What... Mobile Phone? Thanks   Hi, If your mobile Phone is GPS enabled... and longitude of your mobile phone. Thanks
Internet Phone Services
Internet Phone Services      ... is that technology which makes it possible to make phone calls through the internet. This technology is given many common names as internet phone service or digital
Java validate phone number using regular expression
Java validate phone number using regular expression In this tutorial, you will learn how to validate the phone number using regular expression. The user... { public static boolean validatePhone(String phone){ return
How to make phone call from web application
How to make phone call from web application  I'm creating an XHTML application, which can be viewed via IPhone or Blackberry. Application needs to make call to a specific number when user clicks a particular button. Please
Google Android Phone
Google Android Phone       Just to clear the air, Android is not a mobile phone... IE a serious run for its money. The very first phone to feature
The iPhone as a Business Phone
The iPhone as a Business Phone       The Apple iPhone is a great consumer phone with unique..., which is the main advantage of dedicated business phone like the Blackberry
Need runescape 2007 gold but hate phone confirmation?
Need runescape 2007 gold but hate phone confirmation?  Do you think it is really boring to be confirmed when buying runescape 2007 gold pay by paypal? Now, Rs2sale.com solves this problem, you can buy cheapest rs 07 gold without
embedding cell phone camera inweb page
embedding cell phone camera inweb page  actaully I am working on visitor management project based on jsp ..in home page I want to embed my nokia N73 camera to capture image of visitor, so how do i do this? I tried object tag
validation of date,phone number,email - Java Beginners
validation of date,phone number,email  Sir how to validate date,phone number and email in java swings  Hi Friend, Try the following code...)"); t1=new JTextField(20); l2=new JLabel("Enter Phone Number
PC To Phone (PC-Phone) VoIP Directory (Page 5)
PC To Phone (PC-Phone) VoIP Directory (Page5) MediaRing MediaRing® PC Phone... processing technologies, MediaRing® PC Phone ensures high call clarity that beats... and Benefits Besides offering high quality voice communication, MediaRing® PC Phone
Phone Book Midlet Example
; This Example goes to create a Phone Book MIDlet This example illustrates how to create your phone book. In this example we are taking three SCREEN... and in number field user enters phone number. When user enters name and click on Next
 

 

 

DMCA.com