|
 |
asp_databases thread: RE: JavaScript form validation with asp
Message #1 by "Peter Foti (PeterF)" <PeterF@S...> on Tue, 14 May 2002 09:46:13 -0400
|
|
One important thing to note... if the client turns off Javascript, then
your validation is useless. Instead, you would be better off performing
the validation on the server before it is added to your database. This
way, if validation fails you can return an error to the client without
adding the info to the database.
Regards,
Peter
> -----Original Message-----
> From: Thapba [mailto:thapba@h...]
> Sent: Tuesday, May 14, 2002 12:11 AM
> To: ASP Databases
> Subject: [asp_databases] JavaScript form validation with asp
>
>
> Hello,
>
> I have this problem, I have some JavaScript on my
> Register.asp form, it
> sits between the <head> tags. The problem is that, when a
> user want to
> sign up using the register.asp, if they forget to enter
> something in one
> of the requirement fields, the JavaScript should alert them
> right, but
> no, it just passed by, not displaying any eerror to the user.
> Then my
> adduser.asp just added them to the dabatase. I want to alert
> the user
> what they missing, then once they fixed it, add to the database.
>
> The same thing that's happended to my login.asp page.
>
> Any suggestions?
>
>
> Thanks in advance
>
Message #2 by "Drew, Ron" <RDrew@B...> on Tue, 14 May 2002 07:50:20 -0400
|
|
<script language=3D"JavaScript">
<!--
function CheckForm() {
if (document.form1.username.value =3D=3D "")
{
alert("Please enter a value for the \"Name\" field.");
document.form1.username.focus();
return (false);
}
alert(" ..Thank you for completing the form. Your Information will be
sent when you close this window.");
return (true);
}
//-->
</script>
<form name=3D"form1" method=3D"post" action=3D"cart.asp"
onsubmit=3D"return
CheckForm()">
-----Original Message-----
From: Michael Markus [mailto:michaeljmarkus@s...]
Sent: Tuesday, May 14, 2002 2:51 AM
To: ASP Databases
Subject: [asp_databases] RE: JavaScript form validation with asp
your description sounds ok
but you say there is no alert box and the form passes, and the data is
successfully entered (whether blank or not) into the database..... hmmm.
everything should be ok assuming you use the following structure...
<head><title>Register/Login Page</title>
<script>
<!-- Begin
function validateLogin(form)
{
if (document.form1.username.value =3D=3D "") {
alert("Please fill the username field");
document.form1.username.select();
document.form1.username.focus();
return false;
}
return true;
}
//end function validateLogin
//END -->
</script>
</head>
<body>
<form name=3D"form1" method=3D"post" action=3D"cart.asp"
onSubmit=3D"return
validateLogin(this)"> . . . etc...
sorry i can't be of more help
but you haven't given me very much to go on.
good luck..
and let me know how it goes..
Michael Markus
Backend Web Developer
Database and Interface Designer
michaeljmarkus@s...
www.michaelmarkus.ca
-----Original Message-----
From: Thapba [mailto:thapba@h...]
Sent: May 14, 2002 12:11 AM
To: ASP Databases
Subject: [asp_databases] JavaScript form validation with asp
Hello,
I have this problem, I have some JavaScript on my Register.asp form, it
sits between the <head> tags. The problem is that, when a user want to
sign up using the register.asp, if they forget to enter something in one
of the requirement fields, the JavaScript should alert them right, but
no, it just passed by, not displaying any eerror to the user. Then my
adduser.asp just added them to the dabatase. I want to alert the user
what they missing, then once they fixed it, add to the database.
The same thing that's happended to my login.asp page.
Any suggestions?
Thanks in advance
---
Change your mail options at http://p2p.wrox.com/manager.asp or to
unsubscribe send a blank email to
Message #3 by "Drew, Ron" <RDrew@B...> on Tue, 14 May 2002 07:42:03 -0400
|
|
Need to see the javascript code
-----Original Message-----
From: Thapba [mailto:thapba@h...]
Sent: Monday, May 13, 2002 8:11 PM
To: ASP Databases
Subject: [asp_databases] JavaScript form validation with asp
Hello,
I have this problem, I have some JavaScript on my Register.asp form, it
sits between the <head> tags. The problem is that, when a user want to
sign up using the register.asp, if they forget to enter something in one
of the requirement fields, the JavaScript should alert them right, but
no, it just passed by, not displaying any eerror to the user. Then my
adduser.asp just added them to the dabatase. I want to alert the user
what they missing, then once they fixed it, add to the database.
The same thing that's happended to my login.asp page.
Any suggestions?
Thanks in advance
Message #4 by "Thap Ba" <thapba@h...> on Tue, 14 May 2002 05:58:40 +0000
|
|
<html><div style='background-color:'><DIV>
<P><BR><BR></P></DIV>
<DIV></DIV>
<P>Michael,</P>
<P>This is my Register.asp file:</P>
<P><<A
href='mailto:%@LANGUAGE="VBSCRIPT"%'>%@LANGUAGE="VBSCRIPT"%</A>><BR><%<BR>' *** Logout the
current user.<BR>MM_Logout = CStr(Request.ServerVariables("URL")) & "?MM_Logoutnow=1"<BR>If
(CStr(Request("MM_Logoutnow")) = "1") Then<BR> Session.Abandon<BR> MM_logoutRedirectPage =
"Default.asp"<BR> ' redirect with URL parameters (remove the "MM_Logoutnow" query param).<BR> if
(MM_logoutRedirectPage = "") Then MM_logoutRedirectPage = CStr(Request.ServerVariables("URL"))<BR> If (InStr(1,
UC_redirectPage, "?", vbTextCompare) = 0 And Request.QueryString <> "") Then<BR>
MM_newQS = "?"<BR> For Each Item In
Request.QueryString<BR> If (Item <> "MM_Logoutnow")
Then<BR> If (Len(MM_newQS) > 1) Then MM_newQS =
MM_newQS & "&"<BR> MM_newQS = MM_newQS
& Item & "=" &
Server.URLencode(Request.QueryString(Item))<BR> End
If<BR> Next<BR> if (Len(MM_newQS) > 1) Then
MM_logoutRedirectPage = MM_logoutRedirectPage & MM_newQS<BR> End If<BR>
Response.Redirect(MM_logoutRedirectPage)<BR>End If<BR>%></P>
<P><html><BR><head><BR><title>New User
Registration</title><BR><script language="javascript"> <BR>Function
VerifyData(form)<BR>{ <BR> //setting up variables to form.<BR> emailEntered =
document.forms['frmUser'].elements['email'].value ; <BR> firstNameEntered =
document.forms['frmUser'].elements['firstname'].value ; <BR> lastNameEntered =
document.forms['frmUser'].elements['lastname'].value ;<BR> addressEntered =
document.forms['frmUser'].elements['address1'].value ;<BR> cityEntered =
document.forms['frmUser'].elements['city'].value;<BR> stateEntered =
document.forms['frmUser'].elements['state'].selectedIndex;<BR> zipCodeEntered =
document.forms['frmUser'].elements['zipCode'].value;<BR> countryEntered =
document.forms['frmUser'].elements['country'].selectedIndex;<BR> passwordEntered =
document.forms['frmUser'].elements['password'].value; <BR> verifypwdEntered =
document.forms['frmUser'].elements['verifypassword'].value;<BR> <BR> //Fields error
checking<BR> var requiredFieldsErrorMessage = "There's a little error with the information you have
provided:\r"; <BR> var emailErrorMessage = " - email address is missing\r";<BR> var
firstNameErrorMessage = " - first name is missing\r";<BR> var lastNameErrorMessage = " - last name is
missing\r"; <BR> var addressErrorMessage = " - address is missing\r"; <BR> var
cityErrorMessage = " - city is missing\r";<BR> var stateErrorMessage = " - state or province is
missing\r";<BR> var zipCodeErrorMessage = " - postal/zip code is missing or invalid\r";<BR> var
countryErrorMessage = " - country is missing\r";<BR> var passwordErrorMessage = " - password field is
missing\r";<BR> var verifypwdpwdErrorMessage = " - Verify password field is
missing\r";<BR> <BR> <BR> var emailAddr = "";<BR> var zipCode =
"";<BR> <BR> //email error checking <BR> if (emailEntered) <BR> {
<BR> emailValue = new String (emailEntered); <BR> emailHasAt =
emailValue.indexOf("@"); <BR> emailHasPeriod =
emailValue.indexOf(".");<BR> <BR> if((emailHasAt == -1) || (emailHasPeriod == -1))
<BR> { <BR> emailAddr = "no";<BR> }
<BR> else<BR> {<BR> emailAddr =
"yes";<BR> }<BR> }<BR> else<BR> {<BR>  
;emailAddr = "no";<BR> } </P>
<P> // zip/postal code check<BR> if
(zipCodeEntered)<BR> {<BR> if (countryEntered == 1)
<BR> {<BR> if ((zipCodeEntered.length < 5) ||
(zipCodeEntered.length >
5))<BR> {<BR> zipCode =
"no";<BR> }<BR> else<BR> {&
lt;BR> var zipCodeCounter = 0;<BR> while
(zipCodeCounter <
5)<BR> {<BR> foundNum =
zipCodeEntered.charAt(zipCodeCounter);<BR> if ((foundNum >= 0)
&& (foundNum <=
9))<BR> {}<BR> else<
;BR> {<BR> zipC
ode =
"no";<BR> }<BR> zipCod
eCounter
++;<BR> }<BR> }<BR> }<BR
> else<BR> {<BR> zipCode =
"yes";<BR> }<BR> }<BR> else<BR> {<BR>  
;zipCode = "no";<BR> }<BR>} <BR> //Letting user know what was missed
<BR> if ((!firstNameEntered) || (!lastNameEntered) || (!addressEntered) || (!cityEntered) ||
<BR> (stateEntered == 0) || (countryEntered == 0) || (!verifypwdEntered) ||
<BR> (zipCode == "no") || (emailAddr == "no") ||
(!passwordEntered))<BR> {<BR> winOpen = window.open ("blank.htm", "",
"menubar=yes,width=350,height=400");<BR> winOpen.document.write
("<HTML><HEAD><TITLE> You forgot
something</TITLE></HEAD>");<BR> winOpen.document.write
("<BODY>");</P>
<P> winOpen.document.write ("<B>There's a little error with the information you have
provided:</B><P>");<BR> winOpen.document.write ("<A
HREF='javascript:self.close()'>");<BR> winOpen.document.write
("</A>");<BR> <BR> if(!firstNameEntered)
<BR> { <BR> winOpen.document.write (firstNameErrorMessage);
<BR> winOpen.document.write (
"<BR>");<BR> }<BR> if (!lastNameEntered)
<BR> { <BR> winOpen.document.write
(lastNameErrorMessage);<BR> winOpen.document.write (
"<BR>");<BR> } <BR> if (!addressEntered)
<BR> { <BR> winOpen.document.write
(addressErrorMessage);<BR> winOpen.document.write (
"<BR>");<BR> } <BR> if (!cityEntered)
<BR> { <BR> winOpen.document.write
(cityErrorMessage);<BR> winOpen.document.write (
"<BR>");<BR> }<BR> if (stateEntered == 0)
<BR> { <BR> winOpen.document.write
(stateErrorMessage);<BR> winOpen.document.write (
"<BR>");<BR> }<BR> if (zipCode == "no")
<BR> { <BR> winOpen.document.write
(zipCodeErrorMessage);<BR> winOpen.document.write (
"<BR>");<BR> }<BR> if (countryEntered ==
0) <BR> {<BR> winOpen.document.write
(countryErrorMessage);<BR> winOpen.document.write (
"<BR>");<BR> }<BR> if (emailAddr ==
"no") <BR> {<BR> winOpen.document.write
(emailErrorMessage);<BR> winOpen.document.write (
"<BR>");<BR> }<BR> if
(!passwordEntered) <BR> {<BR> winOpen.document.write
(passwordErrorMessage);<BR> winOpen.document.write (
"<BR>");<BR> }<BR> if
(!verifypwdEntered) <BR> {<BR> winOpen.document.write
(verifypwdpwdErrorMessage);<BR> winOpen.document.write (
"<BR>");<BR> }<BR> <BR> winOpen.document.write
("</BODY></HTML>");<BR> setTimeout("winOpen.close()",
8000);<BR> <BR> return false; <BR> }
<BR> else<BR> return true;<BR> <BR> if
(document.frmUser.Password.value != document.frmUser.VerifyPassword.value)<BR>
{<BR> alert ("Your passwords do not match -
please reenter");<BR> return
false;<BR>
}<BR> else<BR> return
true;<BR>}<BR></script></P>
<P></head><BR><body bgcolor="#FFFFFF"><BR><%<BR> If
Request("Update") = "True" Then<BR> Response.Write "<H2><CENTER><font
face=MS Sans Serif>Update User
Registration</font></CENTER></H2>"<BR> Else<BR> Re
sponse.Write "<H2><CENTER><font face=MS Sans Serif>New User
Registration</font></CENTER></H2>"<BR> End
If<BR>%><BR><p> <BR> <%<BR>If Request("Update") = "True"
Then<BR> Response.Write "<CENTER>Please change your registration information as listed
below</CENTER><P>"</P>
<P>Else<BR> If Request("NotFound")= "True" Then<BR> Response.Write
"<CENTER><I>We are unable to locate your information. " &
_<BR> "Please take the time to register
again.</I></CENTER></P>"<BR> Else<BR> Response.Wri
te "<CENTER>(If you're already registered with us, " &
_<BR> "then click on the 'Login' link
below.)</CENTER><P>"<BR> End If<BR> Response.Write
"<CENTER>You need to register with us in order to process for us " &
_<BR> "to process your
order.<CENTER><P>"</P>
<P>End If</P>
<P>%><BR><p align="center"> <BR><form onSubmit="return VerifyData(this)" METHOD="POST"
ACTION="AddUser.asp" NAME="frmUser"><BR> <div align="center">
<BR> <center><BR>
<table cellpadding="0" cellspacing="0" id="AutoNumber1" style="border-collapse:
collapse"><BR> <tr>
<BR> <td align="right"
colspan="2">
<BR> <div
align="center"><b>PLEASE FILL OUT THE FORM BELOW
</b></div><BR> &
;nbsp; </td><BR>
</tr><BR> <tr>
<BR> <td align="right"
colspan="2">
<BR> <div
align="center"><b><font face="MS Sans Serif" size="1">(Fields
<BR> &a
mp;nbsp; with </font><font face="MS Sans Serif" size="1"
color="#008000">*</font><font face="MS Sans Serif" size="1">
<BR> &a
mp;nbsp; are
Required.)</font></b></div><BR> &am
p;nbsp;
</td><BR>
</tr><BR> <tr>
<BR> <td align="right"
bgcolor="#0099FF"> <font size="2" face="Arial, Helvetica, sans-serif"
color="#008000">*</font><font size="2" face="Arial, Helvetica, sans-serif">Email
<BR>
Address:</font></td><BR> &
;nbsp; <td bgcolor="#00CCFF">
<BR>
<input type="text" name="email" value="<%= Session("email")%>"
size="30"><BR>
</td><BR>
</tr><BR> <tr>
<BR> <td align="right"
bgcolor="#0099FF"> <font size="2" face="Arial, Helvetica, sans-serif"
color="#008000">*</font><font size="2" face="Arial, Helvetica, sans-serif">First
<BR>
Name</font><font size="2" face="Arial, Helvetica, sans-serif"
color="#0000FF">:</font></td><BR> &nbs
p; <td bgcolor="#00CCFF">
<BR>
<input type="text" name="firstname" value="<%= Session("firstname")%>"
size="30"><BR>
</td><BR>
</tr><BR> <tr>
<BR> <td align="right"
bgcolor="#0099FF"> <font size="2" face="Arial, Helvetica, sans-serif"
color="#008000">*</font><font size="2" face="Arial, Helvetica, sans-serif">Last
<BR>
Name</font><font size="2" face="Arial, Helvetica, sans-serif"
color="#0000FF">:</font></td><BR> &nbs
p; <td bgcolor="#00CCFF">
<BR>
<input type="text" name="lastname" value="<%= Session("lastname")%>"
size="30"><BR>
</td><BR>
</tr><BR> <tr>
<BR> <td align="right"
bgcolor="#0099FF"> <font face="Arial, Helvetica, sans-serif" color="#008000"
size="1">*</font><font size="2" face="Arial, Helvetica,
sans-serif">Address</font><font size="2" face="Arial, Helvetica, sans-serif"
color="#0000FF">:</font></td><BR> &nbs
p; <td bgcolor="#00CCFF">
<BR>
<input type="text" name="address1" value="<%= Session("StreetAddress1")%>"
size="30"><BR>
</td><BR>
</tr><BR> <tr>
<BR> <td align="right"
bgcolor="#0099FF"><font face="Arial, Helvetica,
sans-serif"></font></td><BR> &am
p;nbsp; <td bgcolor="#00CCFF">
<BR>
<input type="text" name="address2" value="<%= Session("StreetAddress2")%>"
size="30"><BR>
</td><BR>
</tr><BR> <tr>
<BR> <td align="right"
bgcolor="#0099FF"> <font size="2" face="Arial, Helvetica, sans-serif"
color="#008000">*</font><font size="2" face="Arial, Helvetica,
sans-serif">City:</font></td><BR> &nbs
p; <td bgcolor="#00CCFF">
<BR>
<input type="text" name="city" value="<%= Session("city")%>"
size="30"><BR>
</td><BR>
</tr><BR> <tr>
<BR> <td align="right"
bgcolor="#0099FF"> <font size="2" face="Arial, Helvetica, sans-serif"
color="#008000">*</font><font size="2" face="Arial, Helvetica,
sans-serif">State</font><font size="2" face="Arial, Helvetica, sans-serif"
color="#0000FF">:</font></td><BR> &nbs
p; <td bgcolor="#00CCFF">
<BR>
<input type="text" name="state" value="<%= Session("state")%>"
size="30"><BR>
</td><BR>
</tr><BR> <tr>
<BR> <td align="right"
bgcolor="#0099FF"> <font size="2" face="Arial, Helvetica, sans-serif"
color="#008000">*</font><font size="2" face="Arial, Helvetica, sans-serif">Postal
<BR>
Code:</font></td><BR> &nb
sp; <td bgcolor="#00CCFF">
<BR>
<input type="text" name="zipcode" value="<%= Session("zipcode")%>"
size="30"><BR>
</td><BR>
</tr><BR> <tr>
<BR> <td align="right"
bgcolor="#0099FF"> <font size="2" face="Arial, Helvetica, sans-serif"
color="#008000">*</font><font size="2" face="Arial, Helvetica,
sans-serif">Country:</font></td><BR> &
nbsp; <td bgcolor="#00CCFF">
<BR>
<input type="text" name="country" value="<%= Session("country")%>"
size="30"><BR>
</td><BR>
</tr><BR> <tr>
<BR> <td align="right"
bgcolor="#0099FF"> <font face="Arial, Helvetica, sans-serif" size="2"
color="#008000">*</font><font face="Arial, Helvetica, sans-serif"
size="2"></font><font face="Arial, Helvetica, sans-serif" size="2">Quantity
<BR>
Order:</font></td><BR> &n
bsp; <td bgcolor="#00CCFF"><input type="text" value="0" name="quantityorder" value="<%=
Session("quantity")%>" size="30" mmTranslatedValue="type=text value=0 name=quantityorder value= size=30
hilitecolor=%22Dyn%20Up-to-Date%20Color%22" mmTranslatedValue="type=text value=0 name=quantityorder value= size=30
mmTranslatedValue=type=text%20value=0%20name=quantityorder%20value=%20size=30%20%20hilitecolor=%2522Dyn%2520Up-to-Date%2520Color%252
2 hilitecolor=%22Dyn%20Up-to-Date%20Color%22" mmTranslatedValue="type=text value=0 name=quantityorder value= size=30
mmTranslatedValue=type=text%20value=0%20name=quantityorder%20value=%20size=30%20%20hilitecolor=%2522Dyn%2520Up-to-Date%2520Color%252
2
mmTranslatedValue=type=text%20value=0%20name=quantityorder%20value=%20size=30%20mmTranslatedValue=type=text%2520value=0%2520name=qua
ntityorder%2520value=%2520size=30%2520%2520hilitecolor=%252522Dyn%252520Up-to-Date%252520Color%252522%20%20hilitecolor=%2522Dyn%2520
Up-to-Date%2520Color%2522 hilitecolor=%22Dyn%20Up-to-Date%20Color%22" mmTranslatedValue="type=text value=0
name=quantityorder value= size=30
mmTranslatedValue=type=text%20value=0%20name=quantityorder%20value=%20size=30%20%20hilitecolor=%2522Dyn%2520Up-to-Date%2520Color%252
2
mmTranslatedValue=type=text%20value=0%20name=quantityorder%20value=%20size=30%20mmTranslatedValue=type=text%2520value=0%2520name=qua
ntityorder%2520value=%2520size=30%2520%2520hilitecolor=%252522Dyn%252520Up-to-Date%252520Color%252522%20%20hilitecolor=%2522Dyn%2520
Up-to-Date%2520Color%2522
mmTranslatedValue=type=text%20value=0%20name=quantityorder%20value=%20size=30%20mmTranslatedValue=type=text%2520value=0%2520name=qua
ntityorder%2520value=%2520size=30%2520%2520hilitecolor=%252522Dyn%252520Up-to-Date%252520Color%252522%20mmTranslatedValue=type=text%
2520value=0%2520name=quantityorder%2520value=%2520size=30%2520mmTranslatedValue=type=text%252520value=0%252520name=quantityorder%252
520value=%252520size=30%252520%252520hilitecolor=%25252522Dyn%25252520Up-to-Date%25252520Color%25252522%2520%2520hilitecolor=%252522
Dyn%252520Up-to-Date%252520Color%252522%20%20hilitecolor=%2522Dyn%2520Up-to-Date%2520Color%2522
hilitecolor=%22Dyn%20Up-to-Date%20Color%22" mmTranslatedValue="type=text value=0 name=quantityorder value= size=30
mmTranslatedValue=type=text%20value=0%20name=quantityorder%20value=%20size=30%20%20hilitecolor=%2522Dyn%2520Up-to-Date%2520Color%252
2
mmTranslatedValue=type=text%20value=0%20name=quantityorder%20value=%20size=30%20mmTranslatedValue=type=text%2520value=0%2520name=qua
ntityorder%2520value=%2520size=30%2520%2520hilitecolor=%252522Dyn%252520Up-to-Date%252520Color%252522%20%20hilitecolor=%2522Dyn%2520
Up-to-Date%2520Color%2522
mmTranslatedValue=type=text%20value=0%20name=quantityorder%20value=%20size=30%20mmTranslatedValue=type=text%2520value=0%2520name=qua
ntityorder%2520value=%2520size=30%2520%2520hilitecolor=%252522Dyn%252520Up-to-Date%252520Color%252522%20mmTranslatedValue=type=text%
2520value=0%2520name=quantityorder%2520value=%2520size=30%2520mmTranslatedValue=type=text%252520value=0%252520name=quantityorder%252
520value=%252520size=30%252520%252520hilitecolor=%25252522Dyn%25252520Up-to-Date%25252520Color%25252522%2520%2520hilitecolor=%252522
Dyn%252520Up-to-Date%252520Color%252522%20%20hilitecolor=%2522Dyn%2520Up-to-Date%2520Color%2522
mmTranslatedValue=type=text%20value=0%20name=quantityorder%20value=%20size=30%20mmTranslatedValue=type=text%2520value=0%2520name=qua
ntityorder%2520value=%2520size=30%2520%2520hilitecolor=%252522Dyn%252520Up-to-Date%252520Color%252522%20mmTranslatedValue=type=text%
2520value=0%2520name=quantityorder%2520value=%2520size=30%2520mmTranslatedValue=type=text%252520value=0%252520name=quantityorder%252
520value=%252520size=30%252520%252520hilitecolor=%25252522Dyn%25252520Up-to-Date%25252520Color%25252522%2520%2520hilitecolor=%252522
Dyn%252520Up-to-Date%252520Color%252522%20mmTranslatedValue=type=text%2520value=0%2520name=quantityorder%2520value=%2520size=30%2520
mmTranslatedValue=type=text%252520value=0%252520name=quantityorder%252520value=%252520size=30%252520%252520hilitecolor=%25252522Dyn%
25252520Up-to-Date%25252520Color%25252522%2520mmTranslatedValue=type=text%252520value=0%252520name=quantityorder%252520value=%252520
size=30%252520mmTranslatedValue=type=text%25252520value=0%25252520name=quantityorder%25252520value=%25252520size=30%25252520%2525252
0hilitecolor=%2525252522Dyn%2525252520Up-to-Date%2525252520Color%2525252522%252520%252520hilitecolor=%25252522Dyn%25252520Up-to-Date
%25252520Color%25252522%2520%2520hilitecolor=%252522Dyn%252520Up-to-Date%252520Color%252522%20%20hilitecolor=%2522Dyn%2520Up-to-Date
%2520Color%2522 hilitecolor=%22Dyn%20Up-to-Date%20Color%22" mmTranslatedValue="type=text value=0 name=quantityorder value=
size=30
mmTranslatedValue=type=text%20value=0%20name=quantityorder%20value=%20size=30%20%20hilitecolor=%2522Dyn%2520Up-to-Date%2520Color%252
2
mmTranslatedValue=type=text%20value=0%20name=quantityorder%20value=%20size=30%20mmTranslatedValue=type=text%2520value=0%2520name=qua
ntityorder%2520value=%2520size=30%2520%2520hilitecolor=%252522Dyn%252520Up-to-Date%252520Color%252522%20%20hilitecolor=%2522Dyn%2520
Up-to-Date%2520Color%2522
mmTranslatedValue=type=text%20value=0%20name=quantityorder%20value=%20size=30%20mmTranslatedValue=type=text%2520value=0%2520name=qua
ntityorder%2520value=%2520size=30%2520%2520hilitecolor=%252522Dyn%252520Up-to-Date%252520Color%252522%20mmTranslatedValue=type=text%
2520value=0%2520name=quantityorder%2520value=%2520size=30%2520mmTranslatedValue=type=text%252520value=0%252520name=quantityorder%252
520value=%252520size=30%252520%252520hilitecolor=%25252522Dyn%25252520Up-to-Date%25252520Color%25252522%2520%2520hilitecolor=%252522
Dyn%252520Up-to-Date%252520Color%252522%20%20hilitecolor=%2522Dyn%2520Up-to-Date%2520Color%2522
mmTranslatedValue=type=text%20value=0%20name=quantityorder%20value=%20size=30%20mmTranslatedValue=type=text%2520value=0%2520name=qua
ntityorder%2520value=%2520size=30%2520%2520hilitecolor=%252522Dyn%252520Up-to-Date%252520Color%252522%20mmTranslatedValue=type=text%
2520value=0%2520name=quantityorder%2520value=%2520size=30%2520mmTranslatedValue=type=text%252520value=0%252520name=quantityorder%252
520value=%252520size=30%252520%252520hilitecolor=%25252522Dyn%25252520Up-to-Date%25252520Color%25252522%2520%2520hilitecolor=%252522
Dyn%252520Up-to-Date%252520Color%252522%20mmTranslatedValue=type=text%2520value=0%2520name=quantityorder%2520value=%2520size=30%2520
mmTranslatedValue=type=text%252520value=0%252520name=quantityorder%252520value=%252520size=30%252520%252520hilitecolor=%25252522Dyn%
25252520Up-to-Date%25252520Color%25252522%2520mmTranslatedValue=type=text%252520value=0%252520name=quantityorder%252520value=%252520
size=30%252520mmTranslatedValue=type=text%25252520value=0%25252520name=quantityorder%25252520value=%25252520size=30%25252520%2525252
0hilitecolor=%2525252522Dyn%2525252520Up-to-Date%2525252520Color%2525252522%252520%252520hilitecolor=%25252522Dyn%25252520Up-to-Date
%25252520Color%25252522%2520%2520hilitecolor=%252522Dyn%252520Up-to-Date%252520Color%252522%20%20hilitecolor=%2522Dyn%2520Up-to-Date
%2520Color%2522
mmTranslatedValue=type=text%20value=0%20name=quantityorder%20value=%20size=30%20mmTranslatedValue=type=text%2520value=0%2520name=qua
ntityorder%2520value=%2520size=30%2520%2520hilitecolor=%252522Dyn%252520Up-to-Date%252520Color%252522%20mmTranslatedValue=type=text%
2520value=0%2520name=quantityorder%2520value=%2520size=30%2520mmTranslatedValue=type=text%252520value=0%252520name=quantityorder%252
520value=%252520size=30%252520%252520hilitecolor=%25252522Dyn%25252520Up-to-Date%25252520Color%25252522%2520%2520hilitecolor=%252522
Dyn%252520Up-to-Date%252520Color%252522%20mmTranslatedValue=type=text%2520value=0%2520name=quantityorder%2520value=%2520size=30%2520
mmTranslatedValue=type=text%252520value=0%252520name=quantityorder%252520value=%252520size=30%252520%252520hilitecolor=%25252522Dyn%
25252520Up-to-Date%25252520Color%25252522%2520mmTranslatedValue=type=text%252520value=0%252520name=quantityorder%252520value=%252520
size=30%252520mmTranslatedValue=type=text%25252520value=0%25252520name=quantityorder%25252520value=%25252520size=30%25252520%2525252
0hilitecolor=%2525252522Dyn%2525252520Up-to-Date%2525252520Color%2525252522%252520%252520hilitecolor=%25252522Dyn%25252520Up-to-Date
%25252520Color%25252522%2520%2520hilitecolor=%252522Dyn%252520Up-to-Date%252520Color%252522%20mmTranslatedValue=type=text%2520value=
0%2520name=quantityorder%2520value=%2520size=30%2520mmTranslatedValue=type=text%252520value=0%252520name=quantityorder%252520value=%
252520size=30%252520%252520hilitecolor=%25252522Dyn%25252520Up-to-Date%25252520Color%25252522%2520mmTranslatedValue=type=text%252520
value=0%252520name=quantityorder%252520value=%252520size=30%252520mmTranslatedValue=type=text%25252520value=0%25252520name=quantityo
rder%25252520value=%25252520size=30%25252520%25252520hilitecolor=%2525252522Dyn%2525252520Up-to-Date%2525252520Color%2525252522%2525
20%252520hilitecolor=%25252522Dyn%25252520Up-to-Date%25252520Color%25252522%2520mmTranslatedValue=type=text%252520value=0%252520name
=quantityorder%252520value=%252520size=30%252520mmTranslatedValue=type=text%25252520value=0%25252520name=quantityorder%25252520value
=%25252520size=30%25252520%25252520hilitecolor=%2525252522Dyn%2525252520Up-to-Date%2525252520Color%2525252522%252520mmTranslatedValu
e=type=text%25252520value=0%25252520name=quantityorder%25252520value=%25252520size=30%25252520mmTranslatedValue=type=text%2525252520
value=0%2525252520name=quantityorder%2525252520value=%2525252520size=30%2525252520%2525252520hilitecolor=%252525252522Dyn%2525252525
20Up-to-Date%252525252520Color%252525252522%25252520%25252520hilitecolor=%2525252522Dyn%2525252520Up-to-Date%2525252520Color%2525252
522%252520%252520hilitecolor=%25252522Dyn%25252520Up-to-Date%25252520Color%25252522%2520%2520hilitecolor=%252522Dyn%252520Up-to-Date
%252520Color%252522%20%20hilitecolor=%2522Dyn%2520Up-to-Date%2520Color%2522 hilitecolor=%22Dyn%20Up-to-Date%20Color%22"
mmTranslatedValue="type=text value=0 name=quantityorder value= size=30
mmTranslatedValue=type=text%20value=0%20name=quantityorder%20value=%20size=30%20%20hilitecolor=%2522Dyn%2520Up-to-Date%2520Color%252
2
mmTranslatedValue=type=text%20value=0%20name=quantityorder%20value=%20size=30%20mmTranslatedValue=type=text%2520value=0%2520name=qua
ntityorder%2520value=%2520size=30%2520%2520hilitecolor=%252522Dyn%252520Up-to-Date%252520Color%252522%20%20hilitecolor=%2522Dyn%2520
Up-to-Date%2520Color%2522
mmTranslatedValue=type=text%20value=0%20name=quantityorder%20value=%20size=30%20mmTranslatedValue=type=text%2520value=0%2520name=qua
ntityorder%2520value=%2520size=30%2520%2520hilitecolor=%252522Dyn%252520Up-to-Date%252520Color%252522%20mmTranslatedValue=type=text%
2520value=0%2520name=quantityorder%2520value=%2520size=30%2520mmTranslatedValue=type=text%252520value=0%252520name=quantityorder%252
520value=%252520size=30%252520%252520hilitecolor=%25252522Dyn%25252520Up-to-Date%25252520Color%25252522%2520%2520hilitecolor=%252522
Dyn%252520Up-to-Date%252520Color%252522%20%20hilitecolor=%2522Dyn%2520Up-to-Date%2520Color%2522
mmTranslatedValue=type=text%20value=0%20name=quantityorder%20value=%20size=30%20mmTranslatedValue=type=text%2520value=0%2520name=qua
ntityorder%2520value=%2520size=30%2520%2520hilitecolor=%252522Dyn%252520Up-to-Date%252520Color%252522%20mmTranslatedValue=type=text%
2520value=0%2520name=quantityorder%2520value=%2520size=30%2520mmTranslatedValue=type=text%252520value=0%252520name=quantityorder%252
520value=%252520size=30%252520%252520hilitecolor=%25252522Dyn%25252520Up-to-Date%25252520Color%25252522%2520%2520hilitecolor=%252522
Dyn%252520Up-to-Date%252520Color%252522%20mmTranslatedValue=type=text%2520value=0%2520name=quantityorder%2520value=%2520size=30%2520
mmTranslatedValue=type=text%252520value=0%252520name=quantityorder%252520value=%252520size=30%252520%252520hilitecolor=%25252522Dyn%
25252520Up-to-Date%25252520Color%25252522%2520mmTranslatedValue=type=text%252520value=0%252520name=quantityorder%252520value=%252520
size=30%252520mmTranslatedValue=type=text%25252520value=0%25252520name=quantityorder%25252520value=%25252520size=30%25252520%2525252
0hilitecolor=%2525252522Dyn%2525252520Up-to-Date%2525252520Color%2525252522%252520%252520hilitecolor=%25252522Dyn%25252520Up-to-Date
%25252520Color%25252522%2520%2520hilitecolor=%252522Dyn%252520Up-to-Date%252520Color%252522%20%20hilitecolor=%2522Dyn%2520Up-to-Date
%2520Color%2522
mmTranslatedValue=type=text%20value=0%20name=quantityorder%20value=%20size=30%20mmTranslatedValue=type=text%2520value=0%2520name=qua
ntityorder%2520value=%2520size=30%2520%2520hilitecolor=%252522Dyn%252520Up-to-Date%252520Color%252522%20mmTranslatedValue=type=text%
2520value=0%2520name=quantityorder%2520value=%2520size=30%2520mmTranslatedValue=type=text%252520value=0%252520name=quantityorder%252
520value=%252520size=30%252520%252520hilitecolor=%25252522Dyn%25252520Up-to-Date%25252520Color%25252522%2520%2520hilitecolor=%252522
Dyn%252520Up-to-Date%252520Color%252522%20mmTranslatedValue=type=text%2520value=0%2520name=quantityorder%2520value=%2520size=30%2520
mmTranslatedValue=type=text%252520value=0%252520name=quantityorder%252520value=%252520size=30%252520%252520hilitecolor=%25252522Dyn%
25252520Up-to-Date%25252520Color%25252522%2520mmTranslatedValue=type=text%252520value=0%252520name=quantityorder%252520value=%252520
size=30%252520mmTranslatedValue=type=text%25252520value=0%25252520name=quantityorder%25252520value=%25252520size=30%25252520%2525252
0hilitecolor=%2525252522Dyn%2525252520Up-to-Date%2525252520Color%2525252522%252520%252520hilitecolor=%25252522Dyn%25252520Up-to-Date
%25252520Color%25252522%2520%2520hilitecolor=%252522Dyn%252520Up-to-Date%252520Color%252522%20mmTranslatedValue=type=text%2520value=
0%2520name=quantityorder%2520value=%2520size=30%2520mmTranslatedValue=type=text%252520value=0%252520name=quantityorder%252520value=%
252520size=30%252520%252520hilitecolor=%25252522Dyn%25252520Up-to-Date%25252520Color%25252522%2520mmTranslatedValue=type=text%252520
value=0%252520name=quantityorder%252520value=%252520size=30%252520mmTranslatedValue=type=text%25252520value=0%25252520name=quantityo
rder%25252520value=%25252520size=30%25252520%25252520hilitecolor=%2525252522Dyn%2525252520Up-to-Date%2525252520Color%2525252522%2525
20%252520hilitecolor=%25252522Dyn%25252520Up-to-Date%25252520Color%25252522%2520mmTranslatedValue=type=text%252520value=0%252520name
=quantityorder%252520value=%252520size=30%252520mmTranslatedValue=type=text%25252520value=0%25252520name=quantityorder%25252520value
=%25252520size=30%25252520%25252520hilitecolor=%2525252522Dyn%2525252520Up-to-Date%2525252520Color%2525252522%252520mmTranslatedValu
e=type=text%25252520value=0%25252520name=quantityorder%25252520value=%25252520size=30%25252520mmTranslatedValue=type=text%2525252520
value=0%2525252520name=quantityorder%2525252520value=%2525252520size=30%2525252520%2525252520hilitecolor=%252525252522Dyn%2525252525
20Up-to-Date%252525252520Color%252525252522%25252520%25252520hilitecolor=%2525252522Dyn%2525252520Up-to-Date%2525252520Color%2525252
522%252520%252520hilitecolor=%25252522Dyn%25252520Up-to-Date%25252520Color%25252522%2520%2520hilitecolor=%252522Dyn%252520Up-to-Date
%252520Color%252522%20%20hilitecolor=%2522Dyn%2520Up-to-Date%2520Color%2522
mmTranslatedValue=type=text%20value=0%20name=quantityorder%20value=%20size=30%20mmTranslatedValue=type=text%2520value=0%2520name=qua
ntityorder%2520value=%2520size=30%2520%2520hilitecolor=%252522Dyn%252520Up-to-Date%252520Color%252522%20mmTranslatedValue=type=text%
2520value=0%2520name=quantityorder%2520value=%2520size=30%2520mmTranslatedValue=type=text%252520value=0%252520name=quantityorder%252
520value=%252520size=30%252520%252520hilitecolor=%25252522Dyn%25252520Up-to-Date%25252520Color%25252522%2520%2520hilitecolor=%252522
Dyn%252520Up-to-Date%252520Color%252522%20mmTranslatedValue=type=text%2520value=0%2520name=quantityorder%2520value=%2520size=30%2520
mmTranslatedValue=type=text%252520value=0%252520name=quantityorder%252520value=%252520size=30%252520%252520hilitecolor=%25252522Dyn%
25252520Up-to-Date%25252520Color%25252522%2520mmTranslatedValue=type=text%252520value=0%252520name=quantityorder%252520value=%252520
size=30%252520mmTranslatedValue=type=text%25252520value=0%25252520name=quantityorder%25252520value=%25252520size=30%25252520%2525252
0hilitecolor=%2525252522Dyn%2525252520Up-to-Date%2525252520Color%2525252522%252520%252520hilitecolor=%25252522Dyn%25252520Up-to-Date
%25252520Color%25252522%2520%2520hilitecolor=%252522Dyn%252520Up-to-Date%252520Color%252522%20mmTranslatedValue=type=text%2520value=
0%2520name=quantityorder%2520value=%2520size=30%2520mmTranslatedValue=type=text%252520value=0%252520name=quantityorder%252520value=%
252520size=30%252520%252520hilitecolor=%25252522Dyn%25252520Up-to-Date%25252520Color%25252522%2520mmTranslatedValue=type=text%252520
value=0%252520name=quantityorder%252520value=%252520size=30%252520mmTranslatedValue=type=text%25252520value=0%25252520name=quantityo
rder%25252520value=%25252520size=30%25252520%25252520hilitecolor=%2525252522Dyn%2525252520Up-to-Date%2525252520Color%2525252522%2525
20%252520hilitecolor=%25252522Dyn%25252520Up-to-Date%25252520Color%25252522%2520mmTranslatedValue=type=text%252520value=0%252520name
=quantityorder%252520value=%252520size=30%252520mmTranslatedValue=type=text%25252520value=0%25252520name=quantityorder%25252520value
=%25252520size=30%25252520%25252520hilitecolor=%2525252522Dyn%2525252520Up-to-Date%2525252520Color%2525252522%252520mmTranslatedValu
e=type=text%25252520value=0%25252520name=quantityorder%25252520value=%25252520size=30%25252520mmTranslatedValue=type=text%2525252520
value=0%2525252520name=quantityorder%2525252520value=%2525252520size=30%2525252520%2525252520hilitecolor=%252525252522Dyn%2525252525
20Up-to-Date%252525252520Color%252525252522%25252520%25252520hilitecolor=%2525252522Dyn%2525252520Up-to-Date%2525252520Color%2525252
522%252520%252520hilitecolor=%25252522Dyn%25252520Up-to-Date%25252520Color%25252522%2520%2520hilitecolor=%252522Dyn%252520Up-to-Date
%252520Color%252522%20mmTranslatedValue=type=text%2520value=0%2520name=quantityorder%2520value=%2520size=30%2520mmTranslatedValue=ty
pe=text%252520value=0%252520name=quantityorder%252520value=%252520size=30%252520%252520hilitecolor=%25252522Dyn%25252520Up-to-Date%2
5252520Color%25252522%2520mmTranslatedValue=type=text%252520value=0%252520name=quantityorder%252520value=%252520size=30%252520mmTran
slatedValue=type=text%25252520value=0%25252520name=quantityorder%25252520value=%25252520size=30%25252520%25252520hilitecolor=%252525
2522Dyn%2525252520Up-to-Date%2525252520Color%2525252522%252520%252520hilitecolor=%25252522Dyn%25252520Up-to-Date%25252520Color%25252
522%2520mmTranslatedValue=type=text%252520value=0%252520name=quantityorder%252520value=%252520size=30%252520mmTranslatedValue=type=t
ext%25252520value=0%25252520name=quantityorder%25252520value=%25252520size=30%25252520%25252520hilitecolor=%2525252522Dyn%2525252520
Up-to-Date%2525252520Color%2525252522%252520mmTranslatedValue=type=text%25252520value=0%25252520name=quantityorder%25252520value=%25
252520size=30%25252520mmTranslatedValue=type=text%2525252520value=0%2525252520name=quantityorder%2525252520value=%2525252520size=30%
2525252520%2525252520hilitecolor=%252525252522Dyn%252525252520Up-to-Date%252525252520Color%252525252522%25252520%25252520hilitecolor
=%2525252522Dyn%2525252520Up-to-Date%2525252520Color%2525252522%252520%252520hilitecolor=%25252522Dyn%25252520Up-to-Date%25252520Col
or%25252522%2520mmTranslatedValue=type=text%252520value=0%252520name=quantityorder%252520value=%252520size=30%252520mmTranslatedValu
e=type=text%25252520value=0%25252520name=quantityorder%25252520value=%25252520size=30%25252520%25252520hilitecolor=%2525252522Dyn%25
25252520Up-to-Date%2525252520Color%2525252522%252520mmTranslatedValue=type=text%25252520value=0%25252520name=quantityorder%25252520v
alue=%25252520size=30%25252520mmTranslatedValue=type=text%2525252520value=0%2525252520name=quantityorder%2525252520value=%2525252520
size=30%2525252520%2525252520hilitecolor=%252525252522Dyn%252525252520Up-to-Date%252525252520Color%252525252522%25252520%25252520hil
itecolor=%2525252522Dyn%2525252520Up-to-Date%2525252520Color%2525252522%252520mmTranslatedValue=type=text%25252520value=0%25252520na
me=quantityorder%25252520value=%25252520size=30%25252520mmTranslatedValue=type=text%2525252520value=0%2525252520name=quantityorder%2
525252520value=%2525252520size=30%2525252520%2525252520hilitecolor=%252525252522Dyn%252525252520Up-to-Date%252525252520Color%2525252
52522%25252520mmTranslatedValue=type=text%2525252520value=0%2525252520name=quantityorder%2525252520value=%2525252520size=30%25252525
20mmTranslatedValue=type=text%252525252520value=0%252525252520name=quantityorder%252525252520value=%252525252520size=30%252525252520
%252525252520hilitecolor=%25252525252522Dyn%25252525252520Up-to-Date%25252525252520Color%25252525252522%2525252520%2525252520hilitec
olor=%252525252522Dyn%252525252520Up-to-Date%252525252520Color%252525252522%25252520%25252520hilitecolor=%2525252522Dyn%2525252520Up
-to-Date%2525252520Color%2525252522%252520%252520hilitecolor=%25252522Dyn%25252520Up-to-Date%25252520Color%25252522%2520%2520hilitec
olor=%252522Dyn%252520Up-to-Date%252520Color%252522%20%20hilitecolor=%2522Dyn%2520Up-to-Date%2520Color%2522
hilitecolor=%22Dyn%20Up-to-Date%20Color%22"></td><BR> &a
mp;nbsp; </tr><BR>
<tr> <BR> <td
align="right" bgcolor="#0099FF"><font face="Arial, Helvetica,
sans-serif"></font></td><BR> &am
p;nbsp; <td
bgcolor="#00CCFF">&nbsp;</td><BR> &
;nbsp; </tr><BR> <tr>
<BR> <td align="right"
bgcolor="#0099FF"> <font face="Arial, Helvetica, sans-serif" size="2"
color="#008000">*</font><font face="Arial, Helvetica, sans-serif"
size="2">Password:</font></td><BR> &nb
sp; <td bgcolor="#00CCFF">
<BR>
<input type="password" name="password" value="<%= Session("password")%>"
size="30"><BR>
</td><BR>
</tr><BR> <tr>
<BR> <td align="right"
bgcolor="#0099FF"> <font face="Arial, Helvetica, sans-serif" size="2"
color="#008000">*</font><font face="Arial, Helvetica, sans-serif" size="2">Verify
<BR>
Password</font><font face="Arial, Helvetica, sans-serif" size="2"
color="#0000FF">:</font></td><BR> &nbs
p; <td bgcolor="#00CCFF">
<BR>
<input type="password" name="verifypassword" value="<%= Session("password")%>"
size="30"><BR>
</td><BR>
</tr><BR> <tr>
<BR> <td align="right"
bgcolor="#0099FF"><font face="Arial, Helvetica,
sans-serif"></font></td><BR> &am
p;nbsp; <td bgcolor="#00CCFF">
<BR>
<input type="reset" value="Reset"
name="B2"><BR> &
nbsp; <input type="submit" value="Submit"
name="B1"><BR>
</td><BR>
</tr><BR>
</table><BR> </center><BR>
</div><BR></form><BR><div align="center"> <BR>
<center><BR> <table border="1" cellspacing="1" style="border-collapse:
collapse" bordercolor="#111111" width="211"><BR> <tr>
<BR> <td width="67" height="20" valign="top"
bgcolor="#00CCFF" align="center"><font face="Microsoft Sans Serif" size="2">
<BR> <a href="Login.asp"
style="text-decoration:
none">Login</a></font></td><BR> &n
bsp; <td width="48" valign="top" bgcolor="#00CCFF" align="center"><font face="Microsoft
Sans Serif" size="2"> <BR>
<a href="Default.asp" style="text-decoration:
none">Home</a></font></td><BR> &nb
sp; <td width="78" valign="top" bgcolor="#00CCFF" align="center"><font face="Microsoft Sans
Serif" size="2"><A HREF="<%=MM_Logout%>">Log
<BR> Out</A>
</font></td><BR>
</tr><BR> </table><BR>
</center><BR></div><BR></body><BR></html></P>
<P>and this is my AddUser.asp file:</P>
<P><!--#include file="ADO.asp"--><BR><%<BR> Dim rsUsers<BR> set
rsUsers = Server.CreateObject("ADODB.Recordset")<BR> rsUsers.Open "Customer_Tbl", objConn, adOpenForwardOnly,
adLockOptimistic, adCmdTable<BR> <BR> If Session("CustID") <> ""
Then<BR> rsUsers.Filter = "CustID = '" & Session("CustID") &
"'"<BR> Else<BR> rsUsers.Filter = "Email = '" & Request.Form("email") & "'"
& _<BR> "AND Password = '" &
Request.Form("password") & "'"</P>
<P> If rsusers.EOF
Then<BR> rsUsers.AddNew<BR> <BR> End If</P>
<P> End If<BR> <BR> rsUsers("Email") =
Request.Form("email")<BR> rsUsers("Password") = Request.Form("password")<BR> rsUsers("FirstName") =
Request.Form("firstname")<BR> rsUsers("LastName") =
Request.Form("lastname")<BR> rsUsers("StreetAddress1") =
Request.Form("address1")<BR> rsUsers("StreetAddress2") = Request.Form("address2")<BR> rsUsers("City")
= Request.Form("city")<BR> rsUsers("State") = Request.Form("state")<BR> rsUsers("ZipCode") =
Request.Form("zipcode")<BR> rsUsers("Country") = Request.Form("country")<BR> rsUsers("QuantityOrder")
= Request.Form("quantityorder")<BR> rsUsers("Active") = True<BR> rsUsers("Lastlogin") =
Now<BR> rsUsers.Update<BR> <BR> Dim strName, strvalue<BR> For Each
strField in rsUsers.Fields<BR> strName = strField.Name<BR> strValue =
strField.value<BR> Session(strName) =
strValue<BR> Next<BR> Session("blnValidUser") = True <BR> Response.Redirect
"MenuForRegisteredUsers.asp"</P>
<P>%><BR>Tell me what you think is causing the problem? Any help would be
appreciated!<BR><BR></P>
<DIV>Nguyen, Thuc (Peter) H.</DIV>
<DIV></DIV>
<DIV></DIV>
<DIV></DIV>
<DIV></DIV>>From: "Michael Markus" <MICHAELJMARKUS@S...>
<DIV></DIV>>Reply-To: "ASP Databases" <ASP_DATABASES@P...>
<DIV></DIV>>To: "ASP Databases" <ASP_DATABASES@P...>
<DIV></DIV>>Subject: [asp_databases] RE: JavaScript form validation with asp
<DIV></DIV>>Date: Mon, 13 May 2002 23:51:23 -0700
<DIV></DIV>>
<DIV></DIV>>your description sounds ok
<DIV></DIV>>but you say there is no alert box and the form passes, and the data is
<DIV></DIV>>successfully entered (whether blank or not) into the database.....
<DIV></DIV>>hmmm.
<DIV></DIV>>everything should be ok assuming you use the following structure...
<DIV></DIV>>
<DIV></DIV>>
<DIV></DIV>>
<SCRIPT>
</DIV>><!-- Begin
</DIV>>function validateLogin(form)
</DIV>>{
</DIV>> if (document.form1.username.value == "") {
</DIV>> alert("Please fill the username field");
</DIV>> document.form1.username.select();
</DIV>> document.form1.username.focus();
</DIV>> return false;
</DIV>> }
</DIV>>
</DIV>>return true;
</DIV>>
</DIV>>}//end function validateLogin
</DIV>>//END -->
</DIV>></SCRIPT>
<DIV></DIV>>
<DIV></DIV>>
<DIV></DIV>>
<FORM name=form1 onsubmit="return </DIV>>validateLogin(this)" action=cart.asp method=post>
<DIV></DIV>>.
<DIV></DIV>>.
<DIV></DIV>>.
<DIV></DIV>>etc...
<DIV></DIV>>
<DIV></DIV>>sorry i can't be of more help
<DIV></DIV>>but you haven't given me very much to go on.
<DIV></DIV>>good luck..
<DIV></DIV>>and let me know how it goes..
<DIV></DIV>>
<DIV></DIV>>Michael Markus
<DIV></DIV>>Backend Web Developer
<DIV></DIV>>Database and Interface Designer
<DIV></DIV>>michaeljmarkus@s...
<DIV></DIV>>www.michaelmarkus.ca
<DIV></DIV>>
<DIV></DIV>>
<DIV></DIV>>-----Original Message-----
<DIV></DIV>>From: Thapba [mailto:thapba@h...]
<DIV></DIV>>Sent: May 14, 2002 12:11 AM
<DIV></DIV>>To: ASP Databases
<DIV></DIV>>Subject: [asp_databases] JavaScript form validation with asp
<DIV></DIV>>
<DIV></DIV>>
<DIV></DIV>>Hello,
<DIV></DIV>>
<DIV></DIV>>I have this problem, I have some JavaScript on my Register.asp form, it
<DIV></DIV>>sits between the tags. The problem is that, when a user want to
<DIV></DIV>>sign up using the register.asp, if they forget to enter something in one
<DIV></DIV>>of the requirement fields, the JavaScript should alert them right, but
<DIV></DIV>>no, it just passed by, not displaying any eerror to the user. Then my
<DIV></DIV>>adduser.asp just added them to the dabatase. I want to alert the user
<DIV></DIV>>what they missing, then once they fixed it, add to the database.
<DIV></DIV>>
<DIV></DIV>>The same thing that's happended to my login.asp page.
<DIV></DIV>>
<DIV></DIV>>Any suggestions?
<DIV></DIV>>
<DIV></DIV>>
<DIV></DIV>>Thanks in advance
<DIV></DIV>>---
<DIV></DIV>>
<DIV></DIV>>
<DIV></DIV>>
<DIV></DIV>>
<DIV></DIV>>
<DIV></DIV>>
<DIV></DIV>>---
<DIV></DIV>>
<DIV></DIV>>
<DIV></DIV></FORM></div><br clear=all><hr>Get your FREE download of MSN Explorer at <a
href='http://g.msn.com/1HM105401/44'>http://explorer.msn.com</a>.<br></html>
Message #5 by "Michael Markus" <michaeljmarkus@s...> on Mon, 13 May 2002 23:51:23 -0700
|
|
your description sounds ok
but you say there is no alert box and the form passes, and the data is
successfully entered (whether blank or not) into the database.....
hmmm.
everything should be ok assuming you use the following structure...
<head><title>Register/Login Page</title>
<script>
<!-- Begin
function validateLogin(form)
{
if (document.form1.username.value == "") {
alert("Please fill the username field");
document.form1.username.select();
document.form1.username.focus();
return false;
}
return true;
}//end function validateLogin
//END -->
</script>
</head>
<body>
<form name="form1" method="post" action="cart.asp" onSubmit="return
validateLogin(this)">
.
.
.
etc...
sorry i can't be of more help
but you haven't given me very much to go on.
good luck..
and let me know how it goes..
Michael Markus
Backend Web Developer
Database and Interface Designer
michaeljmarkus@s...
www.michaelmarkus.ca
-----Original Message-----
From: Thapba [mailto:thapba@h...]
Sent: May 14, 2002 12:11 AM
To: ASP Databases
Subject: [asp_databases] JavaScript form validation with asp
Hello,
I have this problem, I have some JavaScript on my Register.asp form, it
sits between the <head> tags. The problem is that, when a user want to
sign up using the register.asp, if they forget to enter something in one
of the requirement fields, the JavaScript should alert them right, but
no, it just passed by, not displaying any eerror to the user. Then my
adduser.asp just added them to the dabatase. I want to alert the user
what they missing, then once they fixed it, add to the database.
The same thing that's happended to my login.asp page.
Any suggestions?
Thanks in advance
Message #6 by Vijay Saste <vijay_saste@y...> on Mon, 13 May 2002 20:38:00 -0700 (PDT)
|
|
use return false; in the if condition where it fails.
--- Thapba <thapba@h...> wrote:
> Hello,
>
> I have this problem, I have some JavaScript on my
> Register.asp form, it
> sits between the <head> tags. The problem is that,
> when a user want to
> sign up using the register.asp, if they forget to
> enter something in one
> of the requirement fields, the JavaScript should
> alert them right, but
> no, it just passed by, not displaying any eerror to
> the user. Then my
> adduser.asp just added them to the dabatase. I want
> to alert the user
> what they missing, then once they fixed it, add to
> the database.
>
> The same thing that's happended to my login.asp
> page.
>
> Any suggestions?
>
>
> Thanks in advance
__________________________________________________
Do You Yahoo!?
LAUNCH - Your Yahoo! Music Experience
http://launch.yahoo.com
Message #7 by "Thapba" <thapba@h...> on Tue, 14 May 2002 00:11:20
|
|
Hello,
I have this problem, I have some JavaScript on my Register.asp form, it
sits between the <head> tags. The problem is that, when a user want to
sign up using the register.asp, if they forget to enter something in one
of the requirement fields, the JavaScript should alert them right, but
no, it just passed by, not displaying any eerror to the user. Then my
adduser.asp just added them to the dabatase. I want to alert the user
what they missing, then once they fixed it, add to the database.
The same thing that's happended to my login.asp page.
Any suggestions?
Thanks in advance
|
|
 |