Hi,
I am not experienced in validation. Could I kindly request for some help in javascript validation? I have the following fields which I would like to FORCE EACH user to fill out on the web page:
UserName, Password, FirstName, LastName, Email, LoginName, CompanyName, PhoneNumber
Any help in integrating the validation with the code below would be of tremendous help!
<%@ Language=VBScript %>
<HTML>
<HEAD>
<META NAME="GENERATOR" Content="Microsoft Visual Studio 6.0">
</HEAD>
<DIV ALIGN="LEFT"><FONT FACE="Verdana, Arial, Helvetica, sans-serif" SIZE="5"><object classid="clsid
27CDB6E-AE6D-11cf-96B8-444553540000" codebase=" width="228" height="86" id=ShockwaveFlash1>
<param name=movie value="../images/xxx_anim.swf">
<param name=quality value=high>
<embed src="../images/xxx_anim.swf" quality=high pluginspage=" type="application/x-shockwave-flash" width="228" height="86">
</embed>
</object></font>
</DIV>
<TABLE WIDTH="100%" BORDER="0">
<TR>
<TD COLSPAN="3" bgcolor="#CC9933"><font face="Verdana, Arial, Helvetica, sans-serif"><b>Request Sent</b></font></td>
</TR>
</TABLE>
<%
Dim cnIns
Dim cmdIns
Dim strSQLStatement
Dim strUserName
Dim strPassword
Dim strFirstName
Dim strLastName
Dim strEmail
Dim strLoginName
Dim strCompanyName
Dim strPhoneNumber
Dim strFaxNumber
strUserName = Request.QueryString("UserName"
strPassword = Request.QueryString("Password"
strFirstName = Request.QueryString("FirstName"
strLastName = Request.QueryString("LastName"
strEmail = Request.QueryString("email"
strLoginName = Request.QueryString("LoginName"
strCompanyName = Request.QueryString("CompanyName"
strPhoneNumber = Request.QueryString("PhoneNumber"
strFaxNumber = Request.QueryString("FaxNumber"
strSQLStatement = "Insert into LoginInfo (UserName,PasswordFld,FirstName,LastName,EMailAddress,Status,CompanyName,WorkPhoneNo,FaxNo,UserLevel) " _
+ "values ('" + strUserName + "','" + strPassword + "','" + strFirstName + "','" _
+ strLastName + "','" + strEmail + "','N','" + strCompanyName + "','" _
+ strPhoneNumber + "','" + strFaxNumber + "','NOTUSR')"
set cnIns = Server.CreateObject("ADODB.Connection"
cnIns.ConnectionTimeout = 5
cnIns.CommandTimeout = 15
cnIns.Open "Provider=Microsoft.Jet.OLEDB.4.0; Data Source=C:/xxxDatabase/xxxDatabase.mdb"
Set cmdIns = Server.CreateObject("ADODB.Command"
cmdIns.ActiveConnection = cnIns
cmdIns.CommandText = strSQLStatement
cmdIns.CommandType = 1
cmdIns.Execute
cnIns.Close
'Send mail to the administrator.
Dim sendMail
Dim strBody
Set sendMail = CreateObject("CDONTS.NewMail"
sendMail.From = strEmail
sendMail.To = "xxx.xxx@xxx.com"
sendMail.bcc = "xxx@xxx.com"
sendMail.Subject = "Request for Login/Password."
strBody = vbCRLF + vbCRLF + vbCRLF _
& "Request for new Login/Password" _
& vbCRLF + vbCRLF _
& "User Name : " + strUserName + vbCRLF _
& "Password : " + strPassword + vbCRLF _
& "First Name : " + strFirstName + vbCRLF _
& "Last Name : " + strLastName + vbCRLF _
& "Login requested : " + strLoginName + vbCRLF _
& "E mail Address : " + strEmail + vbCRLF _
& "Company : " + strCompanyName + vbCRLF _
& vbCRLF + vbCRLF _
& "Thank You" + vbCRLF _
& strFirstName + " " + strLastName
sendMail.Body = strBody
on error resume next
sendMail.Send
If Err.Number = 0 Then
Else
Response.Write "Error: " & Err.Description
End If
%>
<TABLE WIDTH="100%">
<TR>
<TD ALIGN="CENTER"><BR><BR><BR><BR><STRONG><FONT SIZE=3 COLOR=RED>Your request has been sent.</FONT></STRONG></TD>
</TR>
</TABLE>
</BODY>
</HTML>
I am not experienced in validation. Could I kindly request for some help in javascript validation? I have the following fields which I would like to FORCE EACH user to fill out on the web page:
UserName, Password, FirstName, LastName, Email, LoginName, CompanyName, PhoneNumber
Any help in integrating the validation with the code below would be of tremendous help!
<%@ Language=VBScript %>
<HTML>
<HEAD>
<META NAME="GENERATOR" Content="Microsoft Visual Studio 6.0">
</HEAD>
<DIV ALIGN="LEFT"><FONT FACE="Verdana, Arial, Helvetica, sans-serif" SIZE="5"><object classid="clsid
<param name=movie value="../images/xxx_anim.swf">
<param name=quality value=high>
<embed src="../images/xxx_anim.swf" quality=high pluginspage=" type="application/x-shockwave-flash" width="228" height="86">
</embed>
</object></font>
</DIV>
<TABLE WIDTH="100%" BORDER="0">
<TR>
<TD COLSPAN="3" bgcolor="#CC9933"><font face="Verdana, Arial, Helvetica, sans-serif"><b>Request Sent</b></font></td>
</TR>
</TABLE>
<%
Dim cnIns
Dim cmdIns
Dim strSQLStatement
Dim strUserName
Dim strPassword
Dim strFirstName
Dim strLastName
Dim strEmail
Dim strLoginName
Dim strCompanyName
Dim strPhoneNumber
Dim strFaxNumber
strUserName = Request.QueryString("UserName"
strPassword = Request.QueryString("Password"
strFirstName = Request.QueryString("FirstName"
strLastName = Request.QueryString("LastName"
strEmail = Request.QueryString("email"
strLoginName = Request.QueryString("LoginName"
strCompanyName = Request.QueryString("CompanyName"
strPhoneNumber = Request.QueryString("PhoneNumber"
strFaxNumber = Request.QueryString("FaxNumber"
strSQLStatement = "Insert into LoginInfo (UserName,PasswordFld,FirstName,LastName,EMailAddress,Status,CompanyName,WorkPhoneNo,FaxNo,UserLevel) " _
+ "values ('" + strUserName + "','" + strPassword + "','" + strFirstName + "','" _
+ strLastName + "','" + strEmail + "','N','" + strCompanyName + "','" _
+ strPhoneNumber + "','" + strFaxNumber + "','NOTUSR')"
set cnIns = Server.CreateObject("ADODB.Connection"
cnIns.ConnectionTimeout = 5
cnIns.CommandTimeout = 15
cnIns.Open "Provider=Microsoft.Jet.OLEDB.4.0; Data Source=C:/xxxDatabase/xxxDatabase.mdb"
Set cmdIns = Server.CreateObject("ADODB.Command"
cmdIns.ActiveConnection = cnIns
cmdIns.CommandText = strSQLStatement
cmdIns.CommandType = 1
cmdIns.Execute
cnIns.Close
'Send mail to the administrator.
Dim sendMail
Dim strBody
Set sendMail = CreateObject("CDONTS.NewMail"
sendMail.From = strEmail
sendMail.To = "xxx.xxx@xxx.com"
sendMail.bcc = "xxx@xxx.com"
sendMail.Subject = "Request for Login/Password."
strBody = vbCRLF + vbCRLF + vbCRLF _
& "Request for new Login/Password" _
& vbCRLF + vbCRLF _
& "User Name : " + strUserName + vbCRLF _
& "Password : " + strPassword + vbCRLF _
& "First Name : " + strFirstName + vbCRLF _
& "Last Name : " + strLastName + vbCRLF _
& "Login requested : " + strLoginName + vbCRLF _
& "E mail Address : " + strEmail + vbCRLF _
& "Company : " + strCompanyName + vbCRLF _
& vbCRLF + vbCRLF _
& "Thank You" + vbCRLF _
& strFirstName + " " + strLastName
sendMail.Body = strBody
on error resume next
sendMail.Send
If Err.Number = 0 Then
Else
Response.Write "Error: " & Err.Description
End If
%>
<TABLE WIDTH="100%">
<TR>
<TD ALIGN="CENTER"><BR><BR><BR><BR><STRONG><FONT SIZE=3 COLOR=RED>Your request has been sent.</FONT></STRONG></TD>
</TR>
</TABLE>
</BODY>
</HTML>