|
Hi,
I am needing some help please.
I want to set up an ASP form in which the contents of the completed form goes to an email address.
For another form on my website I have used an HTML page as my Form page and an ASP for my 'processing' page.
Now the problem about the Form is that I want to use 2 drop-down menu's, and I haven't yet been successful in integrating drop down menus into my HTML page, in order for the choice of the drop down menu that the use has chosen to be processed by the ASP page. Is there a way to do this?
I am currently trying to use an ASP page for the Form which has the code ;
<%@LANGUAGE="VBSCRIPT"%>
<html>
<head>
</head>
<body>
<form name="frmTest" method="post" action="contact_sender.asp">
<select name="lstTest">
<option value="1" <%If (Not isNull(Request.Form("lstTest"))) _
Then If ("1" = CStr(Request.Form("lstTest"))) _
Then Response.Write("SELECTED") : _
Response.Write("")%>>Short Sleeved Jersey</option>
<option value="2" <%If (Not isNull(Request.Form("lstTest"))) _
Then If ("2" = CStr(Request.Form("lstTest"))) _
Then Response.Write("SELECTED") : _
Response.Write("")%>>Long Sleeved Jersey</option>
<option value="3" <%If (Not isNull(Request.Form("lstTest"))) _
Then If ("3" = CStr(Request.Form("lstTest"))) _
Then Response.Write("SELECTED") : _
Response.Write("")%>>Bib Shorts</option>
</select>
<input name="btnSubmit" type="submit" value="Submit to Server">
<%
If Request.Form("lstTest") & "" <> "" Then
Response.Write("<br />Selected Item is " & _
Request.Form("lstTest"))
End If
%>
</form>
</body>
</html>
------------------------------------------------------------------------
and my ASP process page which is ;
<%
varname = Request.Form("txtname")
varphone = Request.Form("txtphone")
varemail = Request.Form("txtemail")
var1stTest = Request.Form("txt1stTest")
recipient = "webmaster@redhillcc.co.uk"
%>
<html>
<head>
<title>Contact Form Confirmation</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
</head>
<body bgcolor="#FFFFFF" text="#000000" leftmargin="0" topmargin="0" marginwidth="0" marginheight="0" link="#009900" vlink="#009900" alink="#009900">
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td valign="top">
<%
Set JMail = Server.CreateObject ("JMail.SMTPMail")
JMail.isoencodeheaders = false
JMail.ServerAddress = "mail.servermail.host-it.co.uk:25"
JMail.Sender = "webmaster@redhillcc.co.uk"
JMail.Subject = "Redhill CC Website Feedback"
JMail.ReplyTo = varemail
JMail.AddRecipient Recipient
'JMail.AddRecipientBCC "redhillccwebmaster@yahoo.co.uk"
JMail.Body = "Name : " & varname & vbCrLf & "Phone : " & varphone & vbCrLf & "Email : " & varemail & vbCrLf & vbCrLf & "Comments" & vbCrLf & "~~~~~~~~" & vbCrLf & vbCrLf & varcomments & vbCrLf & vbCrLf & "Clothing Type : " & var1stTest & vbCrLf
JMail.Priority = 1
JMail.AddHeader "Originating-IP", Request.ServerVariables ("REMOTE_ADDR")
JMail.Execute
%>
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td>
<div align="center">
<p><br>
<br>
</p>
<p> </p>
<p> </p>
<p><font color="#000000" size="3" face="Arial, Helvetica, sans-serif"><b>Thank
you, <%= varname%></b></font></p>
<p><font color="#000000" size="3" face="Arial, Helvetica, sans-serif"><b>Your
message has been e-mailed to us.<br>
<br>
<br>
</b></font></p>
<p> </p>
<p> </p>
<p> </p>
</div>
</td>
</tr>
</table>
</td>
</tr>
</table>
</body>
</html>
-------------------------------------------------------------------
Please tell me where I am going wrong; please also note that I have a limited knowledge of ASP
Cheers
James
|