Home Answers Viewqa JavaScriptQuestions form registration on JavaScript

 
 


Bsharat
form registration on JavaScript
1 Answer(s)      5 months and 15 days ago
Posted in : JavaScript Questions

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 >> <<<

View Answers

December 7, 2012 at 12:02 PM


Here is a code that validates html form using javascript.

<html>
    <h2>Form Validation</h2>
        <script language = "Javascript">
          function checkEmail() {
            if (/^\w+([\.-]?\w+)*@\w+([\.-]?\w+)*(\.\w{2,3})+$/.test(form.email.value)){
            return true;
            }
            return false; 
          }
          function checkName(str){
              var re = /[^a-zA-Z]/g
              if (re.test(str)) return false;
              return true;
            }
            function checkAddress(str){
              var re = /[^[a-z][A-Z][0-9]]/g
              if(re.test(str)) return false;
              return true;
            }
          function validate(){
            var emailID=document.form.email;
              var nn=document.form.name;
                var add=document.form.address;

            if((nn.value==null)||(nn.value=="")){
            alert("Please Enter your Name!")
            nn.focus();
            return false
            }
            if(checkName(nn.value)==false){
            nn.value=""
            alert("Invalid Name!");
            nn.focus()
            return false
            }
            if((emailID.value==null)||(emailID.value=="")){
            alert("Please Enter your Email ID!")
            emailID.focus()
            return false
            }
            if (checkEmail(emailID.value)==false){
            emailID.value=""
            alert("Invalid Email Adderess!");
            emailID.focus()
            return false
            }
            if ((add.value==null)||(add.value=="")){
            alert("Please Enter your Address!")
            add.focus()
            return false
            }
            if (checkAddress(add.value)==false){
            add.value=""
            alert("Invalid Adderess!");
            add.focus()
            return false
            }
            if(document.form.qua.selectedIndex==""){
            alert ( "Please select your qualification!" );
     return false;  
    }
            return true
          }
        </script>
        <form name="form" method="post" onSubmit="return validate()">
        <pre>
        Enter Name:              <input type="text" name="name" size="30"><br>
        Enter an Email Address : <input type="text" name="email" size="30"><br>
        Enter Address            <textarea name="address" rows="5" cols="23"></textarea><br>
        Select Qualification:    <select name="qua">
                                 <option value="BTech">BTech</option>
                                 <option value="MBBS">MBBS</option>
                                 <option value="MBA">MBA</option>
                                 <option value="MCA">MCA</option>
                                 </select><br>

        <input type="submit" name="Submit" value="Submit">
        </pre>
        </form>
</html>









Related Pages:
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 >> <
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>
Registration Form
Registration Form  Hi Friends I am Working on a small project.I have to create a Registration page using MVC pattern where i have to insert data username,password,date of birth,Mobile number number into database. How to insert
registration form
registration form  Hii.. I have to design one registration page in java that looks like REGISTER USERNAME (here i have to check whether username already exists in database) EMAIL ADDRESS (here i have to check whether email
to creating a registration form
to creating a registration form  how to create a registration form
Registration Form in HTML
Registration Form in HTML  User Registration Form in HTML - i wanted to design a user registration form in HTML. So, Can anyone please guide me or give me a peace of code to design a user registration form in HTML. Thanks
popup registration form
popup registration form  hi i want a code for popup registration form.when user click a button popup form will appear.thanks.
Login form and registration
Login form and registration  I need a complete code for ligin and new user registration form and validation
JSP code for registration form
JSP code for registration form  Haiiii can u please tell me how to encrypt password field in registration form and to compare both password and confirm password fields using jsp
AJAX REGISTRATION FORM
AJAX REGISTRATION FORM  I have implemented user name, check and state selection using ajax, in the html registration form. I am loading two XML... either username or state. How to implement both in same registration form could any
to create registration form
to create registration form  hello friends,im student and i want to do an assignment on to create an registration form with 20 input fields by using...://www.roseindia.net/jsp/user-registration-form-using-jsp.shtml
student registration example
visit the following links: http://www.roseindia.net/jsp/user-registration-form...student registration example  1.reg.jsp <%@ page language="java...;login</title> </head> <body> <script type="text/javascript
On Javascript
On Javascript  Design a job registration form using HTML and CSS, through which a job seeker can fill personal, contact, educational, project and experience details to apply for a job. Do proper validation for all mandatory
user Registration form using bean
user Registration form using bean   In this code,password and confirm password does n't matches.Every time an error occured if i entered same string for both.Please help to sort my problem
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
registration application
registration application  How to develop a registration application in struts which has seperate file for database connection and data checking and form and action
how to create a user registration form in php
how to create a user registration form in php  how to create a user registration form in php
registration form using oop concept
registration form using oop concept  I would like to write a program student registration form at kindergartens and display the information... the output?   Registration Form: import javax.swing.*; import java.awt.
user registration
user registration  hi frnds...am working on a project in JSP.i want to create a user registration form with username,password,mail id and check box option for community selection.once the details are registered i want to save
How do I compile the registration form?
How do I compile the registration form?  How do I compile the registration form as stated at the bottom of the following page (URL is below). Do I...://www.roseindia.net/struts/hibernate-spring/user-registration-action.shtml
Registration - Ajax
;hi friend, registration form in jsp function checkEmail(email...; } User registration form...Registration  i want to create a registration page. in which User
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
Developing User Registration Form
Developing User Registration Form   ... necessary to develop the User Registration Form for our Struts, Hibernate and Spring... how to develop the User Registration Form and related JSP files. This User
JavaScript Form Validation
JavaScript Form Validation  JavaScript Form Validation
Develop user registration form
User Registration Form in JSP     ... registration form which will insert  the entered  data into the database... will be inserted  into the database. Firstly the registration form
User Registration Form Using JSP(JspBeans)
User Registration Form Using JSP(JspBeans)  ... of user registration form using jsp. One of the basic programming tactics... a simple registration form (register.html):       <
javascript form submission
javascript form submission  how can apply validation when doing submission like following <html> <script type="text/javascript...(); } </script> <form id="myform" action="submit-form.php
userregistration code -- http://www.roseindia.net/jsp/user-registration-form-using-jsp.shtml
userregistration code -- http://www.roseindia.net/jsp/user-registration-form-using-jsp.shtml  While running this application on netbeans7.0 , i am getting the following error: message /userregister/ description The requested
HTML(Registration form) to Jsp to stored into MS ACCESS database
HTML(Registration form) to Jsp to stored into MS ACCESS database  i am sending one html file that contain 18 fields these are stored in ms-access database by using jsp code.i want to urgent jsp code. please urgent sir. thank
How to Create Login/ Registration Form using PHP and MYSQL
How to Create Login/ Registration Form using PHP and MYSQL  Hi, I am learning PHP. I have some dilemma how to create a Login Form and make connectivity with HTML page using PHP and MYSQL. Is there any body can guide me
javascript
javascript  Hi deepak, how to write form validation on 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...; } return true; } </SCRIPT> </HEAD> <form name="f1" onsubmit
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...: <html> <script src="validateForm.js"> </script> <form
How to insert data into databse by JSP form registration page in netbeans
How to insert data into databse by JSP form registration page in netbeans  ... a student. I have been given a task to create registration page with username & password, & after submitting this form it automatically stores data
this code will be problem it display the error again send jsp for registration form
this code will be problem it display the error again send jsp for registration form  I AM ENTERING THE DETAILS OFTER IT DISPLAY THE ERROR PLEASE.... 1)register.jsp <html> <form method="post" action="insert.jsp"> <
this code will be problem it display the error again send jsp for registration form
this code will be problem it display the error again send jsp for registration form  I AM ENTERING THE DETAILS OFTER IT DISPLAY THE ERROR PLEASE.... 1)register.jsp <html> <form method="post" action="insert.jsp"> <
Javascript
Javascript  in the web form the phonenumber field should be like this format xxx-xxx-xxxx, i want the code in javascript. as a function.   Javascript Phone Number Validation <html> <script> function
User Registration Form Using JSP(JspBeans) after that how i can insert in database
User Registration Form Using JSP(JspBeans) after that how i can insert in database   User Registration Form Using JSP(JspBeans) after that how i can insert in database
Javascript
Javascript  <html> <head> <script type="text/javascript"> function validateForm() { var sname=document.getElementById('spocname...(); } } </script> </head> <body> <form id="f1"> SPOC
javascript
javascript  Hi deepak, sample example on javascript form validation... ."); document.form.contactNo.focus(); return false; } } </script> <form name="form" method="post" onsubmit="return validate();"> <table> <
javascript
; </HEAD> <form name="f1" onsubmit ="return validate();"> <SELECT
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
;/script> </head> <form name="form"> <table> <tr><
javascript
;/script> </head> <form name="form"> <table> <tr><
convert this html form to jsp
convert this html form to jsp  <html> <head> <script language="javascript" src="images/validationm.js"></script> <script language="javascript" src="images/validation.js"></script> <
Ajax Registration Program
Ajax Registration Program      ... to validate the user registration through ajax call and then display the alert... of  Ajax Registration program: <html>   <
Spring 2.5 MVC User Registration Example
Spring MVC User Registration example       Spring 2.5 MVC User Registration Example This tutorial shows you how to create user registration application in Spring MVC. This application
Javascript Form validation Example
Javascript Form validation Example In this section we will discuss about how to validate your application form in javascript. In many applications data... am giving a simple example for form validation using Javascript. Example
Form Layout Container in Flex4
the FormHeading component for show the form heading like Registration Form...Form Layout Container in Flex4: The Form Layout container is a MX container. There is no Spark equivalent. Flex uses the Form Layout container for making
passing values form javascript - JSP-Interview Questions
passing values form javascript  please i want to pass values from javascript function to jsp code how can i do

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.