T
twoanalytic
I have created an asp form using Frontpage 2003. ( I am very new to this).
My form uses aspemail to send an email. I am trying to figure out how to add
a basic confirmation form that basically says that the data was submitted. I
don't know how to add it. Attached below is my code.
<%
If Request("Send") <> "" Then
Set Mail = Server.CreateObject("Persits.MailSender")
Mail.Host = "127.0.0.1"
Mail.From = "(e-mail address removed)" ' from address
Mail.FromName = "contractors" ' optional
Mail.AddAddress "(e-mail address removed)"
' message subject
Mail.Subject = "Contractor Referal"
' message body
Mail.Body = "First Name: " & Request("FirstName") & chr(13) & chr(10) &
"Last Name: " & Request("LastName") & chr(13) & chr(10) & "Company Name: " &
Request("CompanyName") & chr(13) & chr(10) & "Street Address: " &
Request("StreetAddress") & chr(13) & chr(10) & "Zip: " & Request("ZipCode") &
chr(13) & chr(10) & "Phone: " & Request("BusinessPhoneAreaCode") & "-" &
Request("BusinessPhonePrefix") & "-" & Request("BusinessPhoneSuffix") &
chr(13) & chr(10) & "Email Address: " & Request("EmailAddress") & chr(13) &
chr(10) & "Trade: " & Request("Trade") & chr(13) & chr(10) & "Additional
Details: " & Request("AdditionalDetails")
strErr = ""
bSuccess = False
On Error Resume Next ' catch errors
Mail.Send ' send message
nErr = Err.number
If Err <> 0 Then ' error occurred
strErr = Err.Description
else
bSuccess = True
End If
End If
%>
<html>
<head>
<title>ContractorReferal</title>
<style>
<!--
..h { font-family: Times New Roman; font-size: 14pt; color: #333333;
text-decoration: none}
..b { font-family: Arial, Verdana, Tahoma; font-size: 10pt; color: #000000;
text-decoration: none}
-->
</style>
<script language="JavaScript">
<!--
function FP_goToURL(url) {//v1.0
window.location=url;
}
// -->
</script>
</head>
<body bgcolor="#FFFFFF">
<% If strErr <> "" Then %>
<p>
<img src="images/hocoa_top_1.gif" border="0" alt="HOCOA"><img
src="images/hocoa_top_2.jpg" border="0" alt="HOCOA" align="top"><br>
<img border="0" src="images/back2.gif" width="634" height="18"><img
src="images/hocoa_lower_2.gif" border="0" alt="HOCOA" align="top" width="131"
height="79"></p>
<font face="Times New Roman" size="5" color="#333333">
<DIV class="h">
<p align="left">
<b>Tampa Bay Home Repair & Improvement</b>
<br>
<small>Contractor Referral Service</small>
</DIV></font>
<font face="arial" size="2" color="#333333"><DIV class="b">
<p align="center">Home Maintenance & Repair Serving The Tampa Bay Area
<br>
<b>813.341.1180</b> <small> or </small> <b>727.209.1333</b>
</div>
</font>
<p>
</p>
<p> </p>
<h3> </h3>
<h3> </h3>
<h3> </h3>
<h3><font color="#FF0000">Error occurred: <i><% = strErr %></i></font></h3>
<% End If %> <% If bSuccess Then %>
<h3><font color="#00A000">Success! Message sent to HOCOA.;.</font></h3>
<% End If %>
<p> </p>
<font size="5"><b>How Does It Work? </b></font>
<table cellspacing="0" cellpadding="0" border="0" id="table1" width="1203">
<tr>
<td class="arial12" valign="top" width="15"><b>1.</b></td>
<td class="arial12">Tell us about any exceptional contractors <b>that you
personally know</b>.<br>
</td>
</tr>
<tr>
<td class="arial12" valign="top" height="38"><b>2.</b></td>
<td class="arial12" height="38">We will contact the contractor, letting
them know you think they are a quality professional and encouraging them
to become part HOCOA.<br>
</td>
</tr>
<tr>
<td class="arial12" valign="top"><b>3.</b></td>
<td class="arial12">If they become an approved contractor within the HOCOA
network within 30 days of your referral, you will receive a check for $50
USD.<br>
</td>
</tr>
</table>
<table border="0" width="50%" id="table3" style="border-collapse: collapse">
<tr>
<td> <p> </p>
</td>
</tr>
<tr>
<td>Tell us about the Contractor you are refering.
<font color="#FF0000">Required Fields(*)</font></td>
</tr>
</table>
<form method="POST" action="ContractorReferal.asp" onsubmit="return
FrontPage_Form1_Validator(this)" language="JavaScript" name="FrontPage_Form1">
<table cellspacing="0" cellpadding="2" bgcolor="#E0E0E0" width="619">
<tr>
<td width="205" height="42"> </td>
<td width="190" height="42"> </td>
<td width="261" height="42"> </td>
</tr>
<tr>
<th width="205" height="23">
<p align="left"><font color="#FF0000">First Name *</font></p>
</th>
<th width="190" height="23">
<p align="left"><font color="#FF0000"> Last Name *</font></p>
</th>
<th width="261" height="23">
<p align="left"><font color="#FF0000">Company Name *</font></p>
</th>
</tr>
<tr>
<th width="205" height="27">
<p align="left"> <!--webbot bot="Validation" s-display-name="First Name"
s-data-type="String" b-value-required="TRUE" i-minimum-length="1"
i-maximum-length="40" --><input type="text" name="FirstName" size="22"
maxlength="40"></p>
</th>
<th width="190" height="27">
<p align="center"> <!--webbot bot="Validation" s-data-type="String"
b-value-required="TRUE" i-minimum-length="1" --><input name="LastName"
size="20" style="float: left"></p>
</th>
<th width="261" height="27">
<p align="left"> <!--webbot bot="Validation" s-data-type="String"
b-value-required="TRUE" i-minimum-length="1" --><input name="CompanyName"
id="Text1" size="26"></p>
</th>
</tr>
<tr>
<th width="205">
<p align="left">Street Address</p>
</th>
<th width="190">
<p align="left">City</p>
</th>
<th width="261">
<p align="left">Zip</p>
</th>
</tr>
<tr>
<th width="205" height="32">
<p align="left"><input type="text" name="StreetAddress" size="26"></p>
</th>
<th width="190" height="32">
<p align="center"><input type="text" name="City" size="20"></p>
</th>
<th width="261" height="32">
<p align="left"><input type="text" name="ZipCode" size="10"></p>
</th>
</tr>
<tr>
<td width="205"><font color="#FF0000"><b>Business Phone*</b></font></td>
<td width="190"><b>Email Address:</b></td>
<td width="261"><b>Trade</b></td>
</tr>
<tr>
<td width="205" height="57"> <!--webbot bot="Validation"
s-data-type="Integer" s-number-separators="," b-value-required="TRUE"
i-minimum-length="3" i-maximum-length="3" --><input type="text"
name="BusinessPhoneAreaCode" size="3" maxlength="3">-<!--webbot
bot="Validation" s-data-type="Integer" s-number-separators=","
b-value-required="TRUE" i-minimum-length="3" i-maximum-length="3" --><input
type="text" name="BusinessPhonePrefix" size="3" maxlength="3">-<!--webbot
bot="Validation" s-data-type="Integer" s-number-separators=","
b-value-required="TRUE" i-minimum-length="4" i-maximum-length="4" --><input
type="text" name="BusinessPhoneSuffix" size="4" maxlength="4"></td>
<td width="190" height="57">
<input type="text" name="EmailAddress" size="20">
</td>
<td width="261" height="57"><select size="1" name="Trade" multiple>
<option selected>- Select One -</option>
<option value="Architect">Architect</option>
<option>Carpenter</option>
<option>Deck</option>
<option>Doors</option>
<option>Drywall</option>
<option>Electrician</option>
<option>Fencing</option>
<option>Flooring</option>
<option>Gutter</option>
<option>Heating & A/C</option>
<option>Handyman</option>
<option>Home Builder</option>
<option>Landscaper</option>
<option>Mason/Concrete</option>
<option>Painter</option>
<option>Plaster</option>
<option>Plumber</option>
<option>Remodeler</option>
<option>Roofing</option>
<option>Siding</option>
<option>Windows</option>
</select></td>
</tr>
<tr>
<td colspan="3" height="23"><b>Any Additional Details: </b>
</td>
</tr>
<tr>
<td colspan="3">
<textarea rows="10" name="AdditionalDetails" cols="50"></textarea></td>
</tr>
</table>
<p>
<input type="SUBMIT" name="Send" value="Send Message"
onafterupdate="FP_goToURL(/*href*/'index.htm')">
<input type="reset" value="Reset" name="B1"></p>
</form>
</body>
</html>
My form uses aspemail to send an email. I am trying to figure out how to add
a basic confirmation form that basically says that the data was submitted. I
don't know how to add it. Attached below is my code.
<%
If Request("Send") <> "" Then
Set Mail = Server.CreateObject("Persits.MailSender")
Mail.Host = "127.0.0.1"
Mail.From = "(e-mail address removed)" ' from address
Mail.FromName = "contractors" ' optional
Mail.AddAddress "(e-mail address removed)"
' message subject
Mail.Subject = "Contractor Referal"
' message body
Mail.Body = "First Name: " & Request("FirstName") & chr(13) & chr(10) &
"Last Name: " & Request("LastName") & chr(13) & chr(10) & "Company Name: " &
Request("CompanyName") & chr(13) & chr(10) & "Street Address: " &
Request("StreetAddress") & chr(13) & chr(10) & "Zip: " & Request("ZipCode") &
chr(13) & chr(10) & "Phone: " & Request("BusinessPhoneAreaCode") & "-" &
Request("BusinessPhonePrefix") & "-" & Request("BusinessPhoneSuffix") &
chr(13) & chr(10) & "Email Address: " & Request("EmailAddress") & chr(13) &
chr(10) & "Trade: " & Request("Trade") & chr(13) & chr(10) & "Additional
Details: " & Request("AdditionalDetails")
strErr = ""
bSuccess = False
On Error Resume Next ' catch errors
Mail.Send ' send message
nErr = Err.number
If Err <> 0 Then ' error occurred
strErr = Err.Description
else
bSuccess = True
End If
End If
%>
<html>
<head>
<title>ContractorReferal</title>
<style>
<!--
..h { font-family: Times New Roman; font-size: 14pt; color: #333333;
text-decoration: none}
..b { font-family: Arial, Verdana, Tahoma; font-size: 10pt; color: #000000;
text-decoration: none}
-->
</style>
<script language="JavaScript">
<!--
function FP_goToURL(url) {//v1.0
window.location=url;
}
// -->
</script>
</head>
<body bgcolor="#FFFFFF">
<% If strErr <> "" Then %>
<p>
<img src="images/hocoa_top_1.gif" border="0" alt="HOCOA"><img
src="images/hocoa_top_2.jpg" border="0" alt="HOCOA" align="top"><br>
<img border="0" src="images/back2.gif" width="634" height="18"><img
src="images/hocoa_lower_2.gif" border="0" alt="HOCOA" align="top" width="131"
height="79"></p>
<font face="Times New Roman" size="5" color="#333333">
<DIV class="h">
<p align="left">
<b>Tampa Bay Home Repair & Improvement</b>
<br>
<small>Contractor Referral Service</small>
</DIV></font>
<font face="arial" size="2" color="#333333"><DIV class="b">
<p align="center">Home Maintenance & Repair Serving The Tampa Bay Area
<br>
<b>813.341.1180</b> <small> or </small> <b>727.209.1333</b>
</div>
</font>
<p>
</p>
<p> </p>
<h3> </h3>
<h3> </h3>
<h3> </h3>
<h3><font color="#FF0000">Error occurred: <i><% = strErr %></i></font></h3>
<% End If %> <% If bSuccess Then %>
<h3><font color="#00A000">Success! Message sent to HOCOA.;.</font></h3>
<% End If %>
<p> </p>
<font size="5"><b>How Does It Work? </b></font>
<table cellspacing="0" cellpadding="0" border="0" id="table1" width="1203">
<tr>
<td class="arial12" valign="top" width="15"><b>1.</b></td>
<td class="arial12">Tell us about any exceptional contractors <b>that you
personally know</b>.<br>
</td>
</tr>
<tr>
<td class="arial12" valign="top" height="38"><b>2.</b></td>
<td class="arial12" height="38">We will contact the contractor, letting
them know you think they are a quality professional and encouraging them
to become part HOCOA.<br>
</td>
</tr>
<tr>
<td class="arial12" valign="top"><b>3.</b></td>
<td class="arial12">If they become an approved contractor within the HOCOA
network within 30 days of your referral, you will receive a check for $50
USD.<br>
</td>
</tr>
</table>
<table border="0" width="50%" id="table3" style="border-collapse: collapse">
<tr>
<td> <p> </p>
</td>
</tr>
<tr>
<td>Tell us about the Contractor you are refering.
<font color="#FF0000">Required Fields(*)</font></td>
</tr>
</table>
<form method="POST" action="ContractorReferal.asp" onsubmit="return
FrontPage_Form1_Validator(this)" language="JavaScript" name="FrontPage_Form1">
<table cellspacing="0" cellpadding="2" bgcolor="#E0E0E0" width="619">
<tr>
<td width="205" height="42"> </td>
<td width="190" height="42"> </td>
<td width="261" height="42"> </td>
</tr>
<tr>
<th width="205" height="23">
<p align="left"><font color="#FF0000">First Name *</font></p>
</th>
<th width="190" height="23">
<p align="left"><font color="#FF0000"> Last Name *</font></p>
</th>
<th width="261" height="23">
<p align="left"><font color="#FF0000">Company Name *</font></p>
</th>
</tr>
<tr>
<th width="205" height="27">
<p align="left"> <!--webbot bot="Validation" s-display-name="First Name"
s-data-type="String" b-value-required="TRUE" i-minimum-length="1"
i-maximum-length="40" --><input type="text" name="FirstName" size="22"
maxlength="40"></p>
</th>
<th width="190" height="27">
<p align="center"> <!--webbot bot="Validation" s-data-type="String"
b-value-required="TRUE" i-minimum-length="1" --><input name="LastName"
size="20" style="float: left"></p>
</th>
<th width="261" height="27">
<p align="left"> <!--webbot bot="Validation" s-data-type="String"
b-value-required="TRUE" i-minimum-length="1" --><input name="CompanyName"
id="Text1" size="26"></p>
</th>
</tr>
<tr>
<th width="205">
<p align="left">Street Address</p>
</th>
<th width="190">
<p align="left">City</p>
</th>
<th width="261">
<p align="left">Zip</p>
</th>
</tr>
<tr>
<th width="205" height="32">
<p align="left"><input type="text" name="StreetAddress" size="26"></p>
</th>
<th width="190" height="32">
<p align="center"><input type="text" name="City" size="20"></p>
</th>
<th width="261" height="32">
<p align="left"><input type="text" name="ZipCode" size="10"></p>
</th>
</tr>
<tr>
<td width="205"><font color="#FF0000"><b>Business Phone*</b></font></td>
<td width="190"><b>Email Address:</b></td>
<td width="261"><b>Trade</b></td>
</tr>
<tr>
<td width="205" height="57"> <!--webbot bot="Validation"
s-data-type="Integer" s-number-separators="," b-value-required="TRUE"
i-minimum-length="3" i-maximum-length="3" --><input type="text"
name="BusinessPhoneAreaCode" size="3" maxlength="3">-<!--webbot
bot="Validation" s-data-type="Integer" s-number-separators=","
b-value-required="TRUE" i-minimum-length="3" i-maximum-length="3" --><input
type="text" name="BusinessPhonePrefix" size="3" maxlength="3">-<!--webbot
bot="Validation" s-data-type="Integer" s-number-separators=","
b-value-required="TRUE" i-minimum-length="4" i-maximum-length="4" --><input
type="text" name="BusinessPhoneSuffix" size="4" maxlength="4"></td>
<td width="190" height="57">
<input type="text" name="EmailAddress" size="20">
</td>
<td width="261" height="57"><select size="1" name="Trade" multiple>
<option selected>- Select One -</option>
<option value="Architect">Architect</option>
<option>Carpenter</option>
<option>Deck</option>
<option>Doors</option>
<option>Drywall</option>
<option>Electrician</option>
<option>Fencing</option>
<option>Flooring</option>
<option>Gutter</option>
<option>Heating & A/C</option>
<option>Handyman</option>
<option>Home Builder</option>
<option>Landscaper</option>
<option>Mason/Concrete</option>
<option>Painter</option>
<option>Plaster</option>
<option>Plumber</option>
<option>Remodeler</option>
<option>Roofing</option>
<option>Siding</option>
<option>Windows</option>
</select></td>
</tr>
<tr>
<td colspan="3" height="23"><b>Any Additional Details: </b>
</td>
</tr>
<tr>
<td colspan="3">
<textarea rows="10" name="AdditionalDetails" cols="50"></textarea></td>
</tr>
</table>
<p>
<input type="SUBMIT" name="Send" value="Send Message"
onafterupdate="FP_goToURL(/*href*/'index.htm')">
<input type="reset" value="Reset" name="B1"></p>
</form>
</body>
</html>