Share on Google+Share on Google+

sowmya
validating email id
1 Answer(s)      5 years and 9 months ago
Posted in : JavaScript Questions

how to validate the email id ?

Ads

View Answers

July 19, 2011 at 10:10 AM


<html>
<script>
function validate(){
    var e=document.getElementById('email').value;
    var regExpObj = /(\d\d\d)-\d\d\d\d\d\d\d\d/;
    var reg = /^([A-Za-z0-9_\-\.])+\@([A-Za-z0-9_\-\.])+\.([A-Za-z]{2,4})$/;
       var e = document.getElementById('email').value;
       if(reg.test(e) == false) {
          alert('Invalid Email Address');
          document.getElementById('email').value="";
          return false;
       }

    }
</script>
<form id="form" method="post"  onsubmit="javascript:return validate();">
<table>
<tr><td>Email </td><td><input type="text" id="email" ></td></tr>
<tr><td></td><td><input type="submit" value="Submit"></td></tr>
</table>
</form>
</html>

For more information, go through the following link:

JavaScript Email Validation










Related Tutorials/Questions & Answers:
validating email id
validating email id  how to validate the email id ?   <...;tr><td>Email </td><td><input type="text" id="email" ><...('email').value; var regExpObj = /(\d\d\d)-\d\d\d\d\d\d\d\d/; var reg
Validating Emp ID Reply - JSP-Servlet
Validating Emp ID Reply  Respected Sir/Madam, I am Ragavendran.R.. Thanks for your quick response.. Actually I need to check whether Emp ID...("Employee ID cannot be null"); form.id.focus(); return false; } if(form.name.value
Advertisements
Validate email id in jsp - JSP-Interview Questions
Validate email id in jsp  Hi Please Suggest me how to validate email id in JSP(Java Server Faces
Validate Domain of an Email Id - JSP-Servlet
Validate Domain of an Email Id  How to validate the domain name in an Email id before sending a mail for an application using Mail API. ex: [email protected] in the above email id i want to validate whether a.com is present
Printing username,email Id using session variable.
Printing User Name, Email Id and Address using session variable Using $session() function, we can print user name, email id and address of the user. ...;address"];  echo "Your Email ID is ".$session_email."
validating a HTML
validating a HTML  What are the reasons for validating a HTML
jQuery to validate Email Address Validation
jQuery to validate Email Address   ...; program that validate the email address  from server and displays on the user... to develop the  program for Email Address Validation Step 1: Create php
email
email  how do i code for making clicking a send button sends a email
email
email   hi I am using 1and1 server. Using this server i am sending a mail using java program . But it is running some problem occur " Cannot send email. javax.mail.SendFailedException: Invalid Addresses; nested exception
id
id  how to find date of birth and gender in id in html with the help of javascript
Validating XML
Validating XML  Hi, I have a string containing data in XML format. I have to Validate this xml data. Is there any method in java that allows strings as input to validate xml?   Please visit the following link: http
javascript regex validation email
;body> <h2>Validating Email Id..</h2> Email Id : <input type...}$/; if (emailPattern.test(email)) { alert("Email Id: " + email); return true; } else { alert("Email Id is not valid
validating web pages
validating web pages  How to validate HTML web pages
Validating image size
Validating image size  How to validate image size to 2MB in javascript which is updating to mysql database
JSP check email exists or not
from the database whether entered email-id exists or not. The given code accepts the email id from the user and check whether the given email id already...;form"> Email Id: <input type="text" name="email"
validating a form before data is entered.
validating a form before data is entered.  How can I avoid validating a form before data is entered
validating - Swing AWT
validating   hi another problem i am facing in swing is that is i have got many textfeilds ex: Roll No: Name: Address: so Roll No TextField have to Contains only Numbers. Name TextFields have to contain only
Validating the password field
Validating the password field  When the validate method returns back to the registration page the password field get cleared there by asking again one more time to enter the password field at the time of re-submitting the form
email archiving
email archiving  Hi, What is email archiving? Thanks
validating username and password from database
validating username and password from database  Hello sir, i am developing a login page. i want that when i fill data in text fields. it validate data from database. if enter data is match from database. page goes to next page
Validating date in javascirpt - Development process
Validating date in javascirpt   Hi Friends, Can u plz give sample code for validating date in javascript using textbox.((dd--mm--yyyy format) Thank u in advance  Hi, The following code may be useful
Change Email
Change Email  Hi, I need to change my Rose India register email address for receive email, How did it possible
email validation
email validation  during email validation.... after domain name which it means if example [email protected] .... this address allowed by any validation program .... but i want to show invalid email address because domain name com
email validation
email validation  during email validation.... after domain name which it means if example [email protected] .... this address allowed by any validation program .... but i want to show invalid email address because domain name com
Email sending
Email sending  Hi sir, Am doing a project, in that i need to send email to multiple recipients at a same time using jsp so send me the code as soon as possible. Regards, Santhosh
JSP Email
JSP Email  Hi, How to send email using JSP? Thanks   Hi, Check this tutorial: Send Email to selected dropdown user Thanks
validating text fields - Swing AWT
validating text fields  hi i am using NETBEANS IDE so when i want to validate TEXTFEILDS if one textfield is blank then it should focus on that particular textfield so help me with this plz..... /* * To change this template
Java Email
Java Email  I am making one java email applications using jsp-servlets. can you tell me that how can i recieve and send email dynamically in my application in UI... thanx.   Hi, Please read at Email From JSP &
Validating Number Very Urgent - JSP-Servlet
Validating Number Very Urgent  Respected Sir/Madam, I am R.Ragavendran.. I want u to insert the coding for validating number in the place of Emp ID text box.. I am sending the code for your kind reference which tends you
Validating date in javascript - Java Interview Questions
Validating date in javascript   Hi Deepak, Can u give sample code validating date in javascript using text box. thank u in advance  In what format you are going to enter the date in Text box (i.e : dd/mm
total id
total id  how to print and total my id number ..for example if my id is 0123456789 the output will look like this : 0123456789 0+1+2+3+4+5+6+7+8+9=45 help me plz
Tutorials   
Java Spring Hibernate Struts Training code for programming How can I dynamically load user-entered data as content of jquery dialog? java webcam integration question java coding Fix Scrollbar position in a checkboxList after postback Information Save Alert Country wise redirection to files Interface in javascript connect database with javascript Zip Code ZipCode how to validate the email login How to play FLV video files on Ipad using HTML code or javascript code? Nitobi Grid is not working in IE10/IE11 jquery issue plese help RegEx Tree structure from json whose parents can be dragged and dropped from child newyorklife insurance getElementById not working javascript code for search in html file Implement The Skeleton Code Implement This Skeleton Code Mobile Automation using Appium Computer forensic application Java: Searching a string from doc files java linked list urgent !!! java linked list urgent!!! library management library management library management library management question Html form using JavaScript to display the table content java how to prevent no from unroundin off on clicking text box again in JSP and Jquery graph generation from xml design file display data from database in textbox when id entered in textbox Javascript Code for all fields how to get HTTP GET request value using javascript array Javascript Querry autocomplete(): Spring mvc with jquery: I am not getting correct value in the text filed. Please help me Create SpreadSheet same as excel using java applet Create SpreadSheet same as excel using java applet How to change focus among multiple select boxes? Write JQUERY Code Write JQUERY Code Converting jsp variable to java variable java

Ads

 
Advertisement null

Ads