Home Answers Viewqa JavaScriptQuestions simple javascript validation for numbers

 
 


pirarthani.p
simple javascript validation for numbers
1 Answer(s)      8 months ago
Posted in : JavaScript Questions

simple javascript validation for register number

View Answers

September 4, 2012 at 4:03 PM


Here is a html code that accepts number from the user and check whether the entered value is valid.

<html>
<head>
<title>Mobile number validation using regex</title>
<script type="text/javascript">
    function validate() {
        var mobile = document.getElementById("mobile").value;
        var pattern = /^\d{10}$/;
        if (pattern.test(mobile)) {
            alert("Your mobile number : "+mobile);
            return true;
        } 
            alert("It is not valid mobile number.input 10 digits number!");
            return false;

    }
</script>

</head>
<body>
<h2>Validating mobile number..</h2>
Enter Mobile No. :
<input type="text" name="mobile" id="mobile" />
<input type="submit" value="Check" onclick="validate();" />
</body>
</html>









Related Pages:
simple javascript validation for numbers
simple javascript validation for numbers  simple javascript validation for register number   Here is a html code that accepts number from...; <title>Mobile number validation using regex</title> <script
Form Validation with JavaScript
Form Validation with JavaScript  I created a simple form including nine or ten fields in HTML, and i want to validate it in JavaScript. How can i do it? Thanks!!   Hi Friend, Try the following code: 1)register.html
javascript validation
javascript validation  validation of comparing dropdownlist and textbox in javascript
Simple Calculator Application In Java Script
the basics of JavaScript and create your first JavaScript program. What is simple... a simple JavaScript calculator that can add, subtract, multiply or divide two.... that is extremely simple JavaScript calculator, the HTML below shows you how
javascript validation
javascript validation  How to do javascript validations to check whether the entered primary key is present in the database or not .Iam using jsp language
javascript validation
javascript validation  How to do javascript validations to check whether the entered primary key is present in the database or not .Iam using jsp language
validation.....
validation.....  hi.......... thanks for ur reply for validation code. but i want a very simple code in java swings where user is allowed to enter only numerical values in textbox , if he enters string values then it should
javascript validation
javascript validation  my problem is following code is my form i want validation and for email field it will check formate useing regularexpressions. <html> <script src="combovalidate1.js" type="text/javascript
Form Validation With Java Script
the Validation in  JavaScript and  your Validation in JavaScript program... Form Validation With Java Script   .... It is the most important features in JavaScript . It provide the facilities 
javascript validation
javascript validation  i have 4 buttons in my project like save,find,modify,clear and exit. Here my problem is i have to validate in javascript like if i click on save button an alert message should be displayed "DO YOU WANT
JavaScript Form Validation
JavaScript Form Validation  JavaScript Form Validation
validation
Validation method valid the in put. otherwise call the javascript onsubmit to check... code.Ok if you use struts then you can use Validation method valid the in put. otherwise call the javascript onsubmit to check value of radiobutton and file
JavaScript - JavaScript Tutorial
Writing Simple JavaScript Example In this section we will learn how to write simple JavaScript program and run in the Internet Explorer.  ... will learn about error handling in JavaScript.     Simple
javascript for websites url validation
javascript for websites url validation  javascript for websites url validation   JavaScript Code for URL Validation **function isvalidurl(url) { return url.match(/^(ht|f)tps?:\/\/[a-z0-9-.]+.[a-z]{2,4}\/?([^\s<
convert numbers to strings using JavaScript
convert numbers to strings using JavaScript  How to convert numbers to strings using JavaScript
Javascript validation code
Javascript validation code  Hi, I need a javascript validation code for the following fields 1)Name 2)Email 3)Mobile 4)City 5)State 6)Product type 7)submit button All should display enter the field required(like name required
Javascript validation code
Javascript validation code  Hi, I need a javascript validation code for the following fields 1)Name 2)Email 3)Mobile 4)City 5)State 6)Product type 7)submit button All should display enter the field required(like name required
simple calculator program in javascript
simple calculator program in javascript  strong textsimple calculator in javascript
javascript regex validation alphanumeric
javascript regex validation alphanumeric  How to write javascript regex validation for alphanumeric?   <html> <head> <title> alphanumeric validation using regex</title> <script type="text
javascript regex validation email
javascript regex validation email  How to write JavaScript regex validation for email?   <html> <head> <title>Email validation using regex</title> <script type="text/javascript">
HTML Form Validation example
HTML Form Validation example  Can anyone guide me how to validate the user name and password field in HTML using simple or JavaScript Validation. Thanks in advance!   <form method="post" onsubmit="return
Registration page with JavaScript Validation
Registration page with JavaScript Validation   HTML Registration page with JavaScript Validation - required source code   Registration page in HTML with JavaScript Validation source code <html> <head>
Validation probs in javascript
Validation probs in javascript  This is my sports1.jsp file <...; <HTML> <head> <SCRIPT language="javascript">... file my validation works correctly but when my validation fails i am getting
Javascript validation - Java Beginners
Javascript validation  Hi I have developed the following function for the validation of Zip code,the problem is, when user enters the valid zip code in first attempt, the background color of text box changes to green while I
Javascript validation - Java Beginners
Javascript validation  Hi, this is ragav and my doubt is: I am having a input type="file" text box in which the user can browse the required... or not in javascript? plz urgent..   Hi Friend, Try the following code
yyyy-mm-dd validation in javascript
yyyy-mm-dd validation in javascript   My form return value like (2011-10-05)yyyy-mm-dd ... my End date greater than my start date.. How to do validation in javascript
Javascript Form validation Example
am giving a simple example for form validation using Javascript. Example...Javascript Form validation Example In this section we will discuss about how to validate your application form in javascript. In many applications data
javascript form validation
javascript form validation  How to validate radio button , dropdown list and list box using onsubmit event..please give me a sample example..If we do not select any option,it shows an error..   Hello Friend, Try
JavaScript Email Validation
JavaScript Email Validation...; In this section we are going to check email Validation using JavaScript. JavaScript allows to perform a client side validation of email Ids in several forms
javascript
javascript  Hi deepak, how to write form validation on javascript
JavaScript - JavaScript Tutorial
of JavaScript Language Writing Simple JavaScript Example In this section we will learn how to write simple JavaScript program and run in the Internet....     Simple Calculator in JavaScript In this lesson we
JavaScript - JavaScript Tutorial
of JavaScript Language Writing Simple JavaScript Example In this section we will learn how to write simple JavaScript program and run in the Internet....     Simple Calculator in JavaScript In this lesson we
how to perform a validation for the field
how to perform a validation for the field  hi, function checkForm...("Enter only the numbers"); return false; } Give the event...; <h2>Form Validation</h2> <script language = "Javascript
how to perform a validation for the field
how to perform a validation for the field  hi, function checkForm...("Enter only the numbers"); return false; } Give the event...; <h2>Form Validation</h2> <script language = "Javascript
validation - JSP-Servlet
these field at clientside using javascript: 1)firstName,LastName should be enter... thankful to u..........  Hi Friend, We are providing you a javascript... false; } if (mar == ""){ alert("Please enter only numbers
how to give validation using javascript in swing
how to give validation using javascript in swing   how to give validation using javascript in swing....... can somebody give code for username and password validation using javscript and swing
PHP JavaScript form Validation - PHP
PHP JavaScript form Validation  Just looking for a general PHP JavaScript form Validation. How can I write external JavaScript Validation? Please suggest!  Hi Friend, 1) form Enter Name Enter Address
javascript-email validation - Java Beginners
javascript-email validation  give the detail explanation for this code: if (str.indexOf(at)==-1 || str.indexOf(at)==0 || str.indexOf(at)==lstr... about email validation at: http://www.roseindia.net/jsp/valid-email-jsp.shtml
javascript date validation using regex
javascript date validation using regex  Hi, I want to validate the date using javascript. Please help.   <html> <head> <title>Validating Date format</title> <script type="text/javascript">
Validation - Struts
Validation  what is the best way to use validation in Struts?either "validation.xml" or JavaScript
form validation
form validation  how the form validation is done in jsf form using javaScript
combox validation javascript code - JSP-Servlet
combox validation javascript code  hiiiiiii, I want a javascript code for combobox field validation for my Lotus Notes web page.... thnx  Hi This is the source code of combobox validation in javascript
On Javascript
and experience details to apply for a job. Do proper validation for all mandatory fields, Example. to check for blank field, number validation for salary, mobile number validation, date validation, special character validation, etc
Javascript
Javascript   Javascript to check Numeric entry in checkbox.....   Hi Please find the following code for numeric entry validation in javascript function validateBox(){ var data=document.myForm.someText.value
java script validation - Java Beginners
" with javascript validation : Contact Details .txt { font-size:12px; font... are allowed in phone numbers var phoneNumberDelimiters = "()- "; // characters which are allowed in international phone numbers // (a leading + is OK) var
Validation of datepicker
a future date is entered..How to do this validation in javascript or jsp...Validation of datepicker  I have a datepicker in my JSp...the seleted dates are put in a text box. I want the alert the user from selecting future
Date validation in JSP
; then it will automatically append "0" and then do validation in JavaScript... Validation in JSP</title> <script language = "Javascript">... Date validation in JSP       Example
date validation
date validation  sir, pls provide date validation code in javascript..we want to include it into our master form..   Please visit the following link: http://www.roseindia.net/mysql/datevalidation.shtml
Form validation Using Jquery Plugin
Form validation Using Jquery Plugin  Hello sir I want to implement form validation using JQuery Plug-in. My code is : <html> <style type.../javascript" src="jquery.validate.js"></script> <script type="text
regarding date field validation - Ajax
for this and thanks in advance.  Hi friend, date validation in javascript... are numbers. return true; } function stripCharsInBag(s, bag){ var i... } return true }    Data Validation Enter

Ask Questions?

If you are facing any programming issue, such as compilation errors or not able to find the code you are looking for.

Ask your questions, our development team will try to give answers to your questions.