Registration page with JavaScript Validation

Registration page with JavaScript Validation

HTML Registration page with JavaScript Validation - required source code

View Answers

January 5, 2013 at 5:36 PM

Registration page in HTML with JavaScript Validation source code

<html>
    <head>
    <script language="javascript">
    function validateForm()
    {
    var a=document.forms["RForm"]["Lname"].value;
    if (a==null || a=="")
      {
      alert("please Enter Login Name ");
      return false;
      }
      var b=document.forms["RForm"]["Pass"].value;
    if (b==null || b=="")
      {
      alert("please Enter password");
      return false;
      }
       var c=document.forms["RForm"]["RPass"].value;
    if (c==null || c=="")
      {
      alert("please Enter Confirm password");
      return false;
      }
      if(b!=c){
        alert("PassWord Doesn't match..");
        return false;
      }

      var d=document.forms["RForm"]["Email"].value;
    if (d==null || d=="")
      {
      alert("please Enter Email");
      return false;
      }else{
        var mailformat = /^\w+([\.-]?\w+)*@\w+([\.-]?\w+)*(\.\w{2,3})+$/;
        if(d.match(mailformat))
        {
        document.RForm.Email.focus();
        //return true;
        }
        else
        {
        alert("You have entered an invalid email address!");
        document.RForm.Email.focus();
        return false;
        }
      }


      var f=document.forms["RForm"]["Gender"].value;
    if (f==null || f=="")
      {
      alert("please Enter Gender");
      return false;
      }
      var g=document.forms["RForm"]["Country"].value;
    if (g==null || g=="")
      {
      alert("please Enter Country");
      return false;
      }
      var h=document.forms["RForm"]["Adress"].value;
    if (h==null || h=="")
      {
      alert("please Enter Adress");
      return false;
      }
      var i=document.forms["RForm"]["Phone"].value;
    if (i==null || i=="")
      {
      alert("please Enter Phone No");
      return false;

      }

       if(isNaN(i)|| i.indexOf(" ")!=-1)
        {
                            alert("Enter numeric value");
                return false;
                    }
                     if (i.length >10)
                {
                                alert("enter 10 characters"); 
                    return false;
                         }
     }
    </script>
    </head>

    <body>

    <form method="post" name="RForm" onSubmit="return validateForm();">
    <table width="40%"  bgcolor="#efee82" align="center">

        <tr>        
            <td colspan=3 ><font size=3><center><b>REGSTRATION FORM</b></center></font>     
        </tr>

        <tr>
            <td width="30%">Login Name:<br/></td>
            <td><input name="Lname" type="text" size=25 maxlength=20></td>
        </tr>
        <tr>
            <td width="30%">Password:<br/></td>
            <td><input name="Pass" type="password" size=25 maxlength=20></td>
        </tr>
        <tr>
            <td width="30%">Confirm Password :<br/></td>
            <td><input name="RPass" type="password" size=25 maxlength=20></td>
        </tr>
        <tr>
            <td width="30%">Email :<br/></td>
            <td><input name="Email" type="text" size=25 maxlength=20></td>
        </tr>
        <tr>
            <td width="30" valign="middle">Gender:</td>
              <td><select name="Gender" onChange="";>
                  <option selected="selected" value="">---Select---</option>
                  <option value="AU_61">Male</option>
                  <option value="AU_61">Female</option>

                </select></td>
            </tr>
            <td width="30" valign="middle">Select Country :</td>
              <td><select name="Country" onChange="";>
                  <option selected="selected" value="">---Select---</option>
                  <option value="AU_61">India</option>
                  <option value="AU_61">Pakistan</option>
                  <option value="AU_61">Sri Lanka</option>
                  <option value="AU_61">Nepal</option>
                  <option value="AU_61">Bangladesh</option>
                  <option value="AU_61">China</option>          
                </select></td>
            </tr>
        <tr>
            <td width="30%">Adress:<br/></td>
            <td><textarea name="Adress"rows=3 colos=30></textarea></td>
        </tr>
        <tr>
            <td width="30%">Phone no:<br/></td>
            <td><input name="Phone" type="text" size=25 maxlength=10></td>
        </tr>
        <tr>
            <td ><input type="Reset">
            <td ><input type="submit" value="Submit">
        </tr>

    </table>
    </form>
    </body>
    </html>









Related Tutorials/Questions & Answers:
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>
javascript validation
javascript validation  validation of comparing dropdownlist and textbox in javascript
Advertisements
form registration on JavaScript
form registration on JavaScript   i want form of registration on JavaScript > < check the name is string or number & if the name number output error >> and the same of email and birthday and country >> <
JavaScript Form Validation
JavaScript Form Validation  JavaScript Form Validation
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
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
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 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 validation
javascript validation  I need to validate password with following...;/script> <script language="javascript"> function...;<INPUT id=register type=button value=Submit name=Submit onclick='javascript
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<
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
Alphanumeric Validation in JavaScript
Alphanumeric Validation in JavaScript In this tutorials we will discuss about alphanumeric validation in JavaScript. Sometimes it may occur when user have... box named registration number in which we have validated it using 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">
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
Validation probs in javascript
page if validation fails. Thanks s advance...Validation probs in javascript  This is my sports1.jsp file <%@page contentType="text/html" pageEncoding="UTF-8"%> <!DOCTYPE html>
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
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 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
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,ADS_TO_REPLACE_1 Try the following code
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
please check my code is wrong or ok.it was not work .this is form validation in javascript using jsf page
Form validation in javascript using jsf page  ?xml version='1.0' encoding='UTF-8' ?> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional...; <title>view</title> <script type="text/javascript
please check my code is wrong or ok.it was not work .this is form validation in javascript using jsf page
please check my code is wrong or ok.it was not work .this is form validation in javascript using jsf page  <p>?xml version='1.0' encoding...;title>view</title> <script type="text/javascript" >
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
how to create a login page and registration page?
how to create a login page and registration page?  hellow, pls tell me the code for how we can create a login page and registration page and how we can store the info in database.only in advance java as jsp
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
creating web page for form registration
creating web page for form registration  I am creating web page for form registration to my department ..I have to Reprint the Application Form (i.e Download the PDf File from the Database ) , when the user gives the Application
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">
Design a registration.jsp page with input for user registration details
Design a registration.jsp page with input for user registration details  Design a registration.jsp page with input for user registration details like... submitting this details, display the details onto the display.jsp page using
web page for form registration to my department
web page for form registration to my department  I am creating web page for form registration to my department ..I have to Reprint the Application Form (i.e Download the PDf File from the Database ) , when the user gives
Login page validation on ipad
Login page validation on ipad  I am using userId & password labels and their corresponding textfield. Now I want to validate the details by single sign in button and want to switch on to next page. Used two labels again
code for user registration page and login page of emails using jsp
code for user registration page and login page of emails using jsp  hiiiiiii please send me the code for user registration page and login page of email using jsp and servlets and also code for database connectivity to oracle
validation web page
validation web page  vivek i want to crate a webpage with specfic email id and password to that webpage . using jsp & servlets   Hi...;/script> <form id="form" method="post" onsubmit="javascript:return
email entire page javascript
email entire page javascript  How to email entire page in JavaScript without using OB?   ob_end_start(); // page content if(!empty($_GET['purpose']) && $_GET['purpose'] == "email") { $message = ob_get
start date and end date validation in javascript - Ajax
start date and end date validation in javascript  hi, i am doing web... validations in javascript. end date should be greater than start date if so less than... in google and i got some scripts but it is not good validation.  
login page validation
login page validation  hi could you please send me code for login validations Email validation and password email should be in correct format and valid password in java   import java.awt.*; import javax.swing.
get JavaScript onto a web page
get JavaScript onto a web page  How do we get JavaScript onto a web page
html code for student registration form
that resets all fields to blank. We have used JavaScript validation... explained you how to make html page for student registration and validate it with JavaScript. JavaScript is used to validate the HTML page in web
JavaScript navigate to page
JavaScript navigate to page...; In this section, you will learn how to navigate from one page to another using JavaScript. For this purpose, we have created two html pages navigatePage.html
force a page to go to another page using JavaScript
force a page to go to another page using JavaScript  How to force a page to go to another page using JavaScript
JavaScript password validation
JavaScript password validation We are going to discuses about JavaScript password special characters validation. In this example we have created one "... used JavaScript password validation and check for an alphabet , number
JavaScript - JavaScript Tutorial
in JavaScript.    Form Validation with JavaScript In this lesson you will learn form validation in JavaScript.   ... functions via javascript: URLs Conditionally navigating the user to a page
JavaScript - JavaScript Tutorial
in JavaScript.    Form Validation with JavaScript In this lesson you will learn form validation in JavaScript.   ... functions via javascript: URLs Conditionally navigating the user to a page
javascript
javascript  Hi deepak, how to write form validation on javascript
URL validation in JavaScript
URL validation in JavaScript In this tutorial we are going to discuss, how to validate a URL in JavaScript. Java Script is a Scripting language. A Java Script language is a lightweight programming language. JavaScript code are written
in registration page,hw the details wil b stored in db,n retrieved.....
in registration page,hw the details wil b stored in db,n retrieved.....  1)in registration page,when new user register his details,hw the details will b stored in db....(i knw hw to do it bt i ve some doubts in it),so plz give me

Ads