Ok..if currency aint your thing how about EMail Validation? :) On the register.asp page (code below), how do we make sure that only an email address is entered. we only need a very basic one - one that makes sure there is some text followed by '@' followed by some more text and a '.' ending with text eg 'com'. If for example
[email protected] is entered we want the system to run as normal, but if Test is entered, we want a message to read please enter a valid email address. Much ike the message is shown for the password validation.
Thank you for any help you can offer:)
<HTML>
<HEAD>
<SCRIPT language="JavaScript">
<!--
function VerifyData()
{
if (document.frmUser.Password.value != document.frmUser.VerifyPassword.value)
{
alert ("Your passwords do not match - please reenter");
return false;
}
else
return true;
}
-->
</SCRIPT>
<TITLE>Going Going GONE!- User Registration</TITLE>
</HEAD>
<BODY BGCOLOR="#003399">
<BASEFONT FACE="Verdana" COLOR="#FF6600">
<BODY BGCOLOR="#003399" body bgproperties="fixed" background="backpic.jpg">
<p><img border="0" src="logo.bmp" width="50" height="50"></p>
<CENTER><a href="Default.asp"><img border="0" src="Home.png" width="120" height="19"></a><a href="login.asp"><img border="0" src="Login.png" width="120" height="19"></a><a href="Register.asp"><img border="0" src="Register.png" width="120" height="19"></a><a href="browselistings.asp"><img border="0" src="Browse.png" width="120" height="19"></a><a href="http://www.guistuff.com/"><img border="0" src="http://www.guistuff.com/images/11dot.gif" width="1" height="1"></a><CENTER>
<CENTER>
<%
If Request("Update") = "True" Then
Response.Write "<H1>Going Going GONE!<BR> Update User Registration</H1>"
Else
Response.Write "<H1>Going Going GONE!<BR> New User Registration</H1>"
End If
%>
</CENTER>
<P>
<%
If Request("Update") = "True" Then
Response.Write "Please change your registration information as listed below<P>"
Else
If Request("NotFound") = "True" Then
Response.Write "<I>We were unable to locate your information. " & _
"Please take the time to register again.</I><P>"
Else
Response.Write "<CENTER>(If you're already registered with us, " & _
"then click the 'Login' link below.)</CENTER><P>"
End If
Response.Write "You only need to register with our system if you want to " & _
"bid on existing 'for-sale' items, or sell your own items " & _
"on these pages. <BR> " & _
"In order to use these services, please take a few minutes " & _
"to complete the form below. Once you have done that, " & _
"you will have full access to the system."
End If
%>
<FORM ACTION="AddUser.asp" NAME="frmUser" METHOD="POST"
onSubmit="return VerifyData()">
<TABLE BORDER=0>
<TR>
<TD WIDTH=20% ROWSPAN=11> </TD>
<TD>E-Mail Address:</TD>
<TD><INPUT TYPE="Text" NAME="email" VALUE="<%= Session("EMailAddress")%>"
SIZE="40"></TD>
</TR>
<TR>
<TD>Given Name:</TD>
<TD><INPUT TYPE="Text" NAME="GivenName" VALUE="<%= Session("GivenName")%>"
SIZE="40"></TD>
</TR>
<TR>
<TD>Family Name:</TD>
<TD><INPUT TYPE="Text" NAME="FamilyName" VALUE="<%= Session("FamilyName")%>"
SIZE="40"></TD>
</TR>
<TR>
<TD>Address:</TD>
<TD><INPUT TYPE="Text" NAME="Address1" VALUE="<%= Session("StreetAddress1")%>"
SIZE="40"></TD>
</TR>
<TR>
<TD></TD>
<TD><INPUT TYPE="Text" NAME="Address2" VALUE="<%= Session("StreetAddress2")%>"
SIZE="40"></TD>
</TR>
<TR>
<TD>City:</TD>
<TD><INPUT TYPE="Text" NAME="City" VALUE="<%= Session("City")%>"
SIZE="40"></TD>
</TR>
<TR>
<TD>County:</TD>
<TD><INPUT TYPE="Text" NAME="County" VALUE="<%= Session("County")%>"
SIZE="40"></TD>
</TR>
<TR>
<TD>Postal Code:</TD>
<TD><INPUT TYPE="Text" NAME="PostalCode" VALUE="<%= Session("PostalCode")%>"
SIZE="40"></TD>
</TR>
<TR>
<TD>Country:</TD>
<TD><INPUT TYPE="Text" NAME="Country" VALUE="<%= Session("Country")%>"
SIZE="40"></TD>
</TR>
<TR>
<TD> <P>Password:</TD>
<TD VALIGN=bottom><INPUT TYPE="Password" NAME="Password"
VALUE="<%= Session("Password") %>" SIZE="40"></TD>
</TR>
<TR>
<TD>Verify Password:</TD>
<TD><INPUT TYPE="Password" NAME="VerifyPassword" SIZE="40"></TD>
</TR>
<TR>
<TD></TD>
<TD ALIGN=CENTER COLSPAN=2><BR>
<INPUT TYPE="Submit" VALUE="Submit Registration">
<INPUT TYPE="RESET"></TD>
</TR>
</TABLE>
</FORM>