CoderZone.org

Category: >> ASP/VB Code >> Check for a Valid Email Address (VBScript) Bookmark and Share

<< lastnext >>

Snippet Name: Check for a Valid Email Address (VBScript)

Description: An example of checking for a valid email address when a form is submitted.

Comment: (none)

Author:
Language: VB
Highlight Mode: VB
Last Modified: December 03rd, 2010

<SCRIPT Language="VBScript">
 
Function frmExample_onsubmit
   If instr(frmExample.txtemail.Value, "@") = 0 OR _
	instr(frmExample.txtemail.Value, ".") = 0 OR _
	Len(frmExample.txtemail.Value) < 7 Then
	window.alert "Please specify a valid e-mail address!"
	frmExample_onsubmit = False
   End IF
 
End Function
</SCRIPT>
 
There haven't been any comments added for this snippet yet. You may add one if you like.  Add a comment 
© coderzone.org | users online: 10