Snap Builder Public Codes Library
Snap | Generators | Login | Browse | Search | Enter Code | Export Snap Builder Public Codes Library

 

Category: Javascript Codes Library >> Forms, Radio, Buttons, Check Box >> Email Address Checker


Code Snippet </> Info


Snippet Name: Email Address Checker

Description: This script will verify that an E-mail address is entered correctly by requiring the user to re-enter the address, checking to make sure there is no typographical error.

Compatible Browsers:
Chrome BrowserFirefox BrowserInternet Explorer BrowserOpera BrowserSafari Browser

Note:

Author: William Bontrager

Last Modified: 2015-12-13 06:37:28

Language: javascript

Highlight Mode: javascript

Copy Codes: Use Free Notepad ++
Bookmark and Share

Snap HTML Code Editor:
Paste the source code, make changes and instantly see it in live preview.
Snap HTML Code Editor


  About Copying

<html> <head> <title>Email Address Checker Javascript Code Snippet</title> <script> /* Begin Email Address Checker == This Script Free To Use Providing This Notice Remains == == This Script Has Been Found In The http://snapbuilder.com Free Public Codes Library == == NOTICE: Though This Material May Have Been In A Public Depository, Certain Author Copyright Restrictions May Apply == == Created By: William Bontrager | http://www.willmaster.com : Creative Commons License == */ function ErrorCheck() { var formname = "myform"; var fieldwithlist = "identicalfields"; var er = new String(); var tempstring = eval("document."+formname+"."+fieldwithlist+".value"); if(tempstring.length > 1) { var idi = tempstring.split(','); var ts0 = eval("document."+formname+"."+idi[0]+".value"); var ts1 = eval("document."+formname+"."+idi[1]+".value"); if(ts0 != ts1) { er = 'The e-mail addresses do not match. Please re-enter them again.'; } } if(er.length > 0) { alert(er); return false; } return true; } </script> </head> <body> <p>This script will verify that an E-mail address is entered correctly by requiring the user to re-enter the address, checking to make sure there is no typographical error.</p> <form name="myform" onsubmit="return ErrorCheck();" method="post" action=""> <input type="hidden" name="identicalfields" value="email,emailagain"> <p style="width:300px; text-align:right;">E-mail<br /> <input type="text" name="email" size="22"><br /> Re-enter E-mail again<br /> <input type="text" name="emailagain" size="22"></p> <p style="width:300px; text-align:center;"><input type="submit"></p> </form> </body> </html>


[ Snippet Options ]

 

© 2002 -  Snap Builder Public Codes Library