LauraWord
12-10-2009, 10:10 PM
Is there a way to pull the value of a drop down selection in one place in the ASP, and pull the name from the same field in another?
Drop Down Code
<select size="1" name="Brand" tabindex="4">
<option>Choose One</option>
<option value="EmailAddress1" name="BrandInitals1">Brand Name1</option>
<option value="EmailAddress2" name="BrandInitals2">Brand Name2</option>
<option value="EmailAddress3" name="BrandInitals3">Brand Name3</option>
</select>
ASP Code
<%
'Dim Your_Name, Your_Id, Your_Site, Order, Brand, Customer_Name, Customer_Phone, Alternate_Phone, Explaination
body = "<TABLE>"
body = body + "<TR><TD>Name:</TD><TD>" + Request.Form("Your_Name") + "</TD></TR>"
body = body + "<TR><TD>ID:</TD><TD>" + Request.Form("Your_Id") + "</TD></TR>"
body = body + "<TR><TD>Site:</TD><TD>" + Request.Form("Your_Site") + "</TD></TR>"
body = body + "<TR><TD>Order#:</TD><TD>" + Request.Form("Order") + "</TD></TR>"
body = body + "<TR><TD>Customer:</TD><TD>" + Request.Form("Customer_Name") + "</TD></TR>"
body = body + "<TR><TD>Phone:</TD><TD>" + Request.Form("Customer_Phone") + "</TD></TR>"
body = body + "<TR><TD>Alternate:</TD><TD>" + Request.Form("Alternate_Phone") + "</TD></TR>"
body = body + "<TR><TD>Explaination:</TD><TD>" + Request.Form("Explaination") + "</TD></TR>"
body = body + "<TR><TD colspan=""2"">Instructions Here. </TD><TD>" + "</TD></TR>"
set mailbot = Server.CreateObject("CDO.message")
mailbot.To = Request.Form("Brand") //I want EmailAddress here
'mailbot.CC = ""
'mailbot.BCC = ""
mailbot.From = ""
mailbot.Subject = Request.Form("Brand") //I want BrandInitals here
mailbot.HTMLBody= body
mailbot.Send
set mailbot = nothing
response.redirect "Thank_You.htm"
%>
Drop Down Code
<select size="1" name="Brand" tabindex="4">
<option>Choose One</option>
<option value="EmailAddress1" name="BrandInitals1">Brand Name1</option>
<option value="EmailAddress2" name="BrandInitals2">Brand Name2</option>
<option value="EmailAddress3" name="BrandInitals3">Brand Name3</option>
</select>
ASP Code
<%
'Dim Your_Name, Your_Id, Your_Site, Order, Brand, Customer_Name, Customer_Phone, Alternate_Phone, Explaination
body = "<TABLE>"
body = body + "<TR><TD>Name:</TD><TD>" + Request.Form("Your_Name") + "</TD></TR>"
body = body + "<TR><TD>ID:</TD><TD>" + Request.Form("Your_Id") + "</TD></TR>"
body = body + "<TR><TD>Site:</TD><TD>" + Request.Form("Your_Site") + "</TD></TR>"
body = body + "<TR><TD>Order#:</TD><TD>" + Request.Form("Order") + "</TD></TR>"
body = body + "<TR><TD>Customer:</TD><TD>" + Request.Form("Customer_Name") + "</TD></TR>"
body = body + "<TR><TD>Phone:</TD><TD>" + Request.Form("Customer_Phone") + "</TD></TR>"
body = body + "<TR><TD>Alternate:</TD><TD>" + Request.Form("Alternate_Phone") + "</TD></TR>"
body = body + "<TR><TD>Explaination:</TD><TD>" + Request.Form("Explaination") + "</TD></TR>"
body = body + "<TR><TD colspan=""2"">Instructions Here. </TD><TD>" + "</TD></TR>"
set mailbot = Server.CreateObject("CDO.message")
mailbot.To = Request.Form("Brand") //I want EmailAddress here
'mailbot.CC = ""
'mailbot.BCC = ""
mailbot.From = ""
mailbot.Subject = Request.Form("Brand") //I want BrandInitals here
mailbot.HTMLBody= body
mailbot.Send
set mailbot = nothing
response.redirect "Thank_You.htm"
%>