|
| |||||||||
| Tags: client side, javascript, programming language, validate no |
![]() |
| | Thread Tools | Search this Thread |
|
#1
| |||
| |||
| How to validate client side javascript for phone number
How to validate the client side validation along with your programming language validation. This ValidateNo function receive two arguments. I have set the two parameters First argument is html / server control value, which should be entered by user and Second argument is comparision string. |
|
#2
| ||||
| ||||
| Re: How to validate client side javascript for phone number
Following is the simple HTML coding that gives you the client side html coding which will allow you to insert the phone number of an client that will submit the number. Just copy paste the program on the text file and HTML extension. Code: <form name="Form1" onsubmit="return FormValidate()"> <input type="text" size="25" name="PhoneNumber" /> <br /><br /> <input type="submit" value="Submit" /> </form> |
|
#3
| ||||
| ||||
| Re: How to validate client side javascript for phone number
You store something as numeric when you need to calculate its value (such as add another number to it), or sort ascending / descending. NumStr : This is the value which you want to validate. It will come from your form control. It may by TextBox control (HTML or ServerControl). The problem with this code is you can add in more than 4 digits at the end. |
|
#4
| |||
| |||
| Re: How to validate client side javascript for phone number
To solve the additional digits at the end and prevent digits at the beginning the expression should read (/^\\d{3}\\-\\d{3}\\-\\d{4}$/)==-1). Use your cursor to highlight the script, and copy (type Control-c or Apple-c) the script into a new file in your text editor (such as Note Pad or Simple Text) and save (Control-s or Command-s). This data is passed to ASP script, or some other technology and if the data contains an error. |
![]() |
|
| Thread Tools | Search this Thread |
| |
Similar Threads for: "How to validate client side javascript for phone number" | ||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Number Keys on Right Side is not Working | Skullnit | Hardware Peripherals | 2 | 04-09-2011 06:08 PM |
| HTTPS client-side POST | ISAIAH | Software Development | 6 | 23-01-2010 10:38 AM |
| How to validate IMEI number of Lephone a1 | SANG18 | Portable Devices | 4 | 11-12-2009 03:16 PM |
| Difference between Server-side and Client-side code? | Booth | Software Development | 2 | 08-01-2009 03:21 PM |
| Force a client (2000/XP) to validate its logon against a specific | Aleric | Window 2000 Help | 3 | 10-07-2006 08:19 PM |