Hello everyone :D
I need to design a form where the user enters their name, email address and their managers email address.
Then, the user proceeds to answer "X" multiple choice questions. I want the form to email the users answers, to both the user and the manager.
Below are some screen shot to better explain:


As of now the form does absolutely nothing...
Any insight would be greatly appreciated!
and the code:
Code:
<%@ Language=VBScript %>
<%
Option Explicit
Response.Buffer = true
Response.Expires = -1000
%>
<html>
<head>
<title>ESP - Certification - Multiple-Choice Questions</title>
<style type="text/css">
.button {border-style: inset;
border-color: #FAD2A2;
background-color: #FAD2A2;
width: 90px;
text-align: center;
font-family : Verdana;
font-weight: bold;
color : Black;
font-size: 10pt;
padding: 1px}
</style>
</head>
<body bgcolor="#FFFFFF" text="#000000" vlink="#800080" topmargin="0" leftmargin="0" onload="ChangeOn()" marginheight="0" marginwidth="0" link="#0000FF" alink="#FF0000">
<div id="main">
<table width="780" border="0" cellspacing="0" cellpadding="5" height="1" align="left">
<tr bgcolor="#FF909B">
<td width="725" height="6" valign="top" bgcolor="#FF9933">
<font face="Verdana, Arial, Helvetica, sans-serif" size="4"><b><i>CERTIFICATION</i></b></font>
</td>
</tr>
<tr bgcolor="#FFBFC6" valign="middle">
<td height="13" bgcolor="#FAD2A2">
<font face="Verdana, Arial, Helvetica, sans-serif" size="4"><b><i>MULTIPLE CHOICE
QUESTIONS</i></b></font>
</td>
</tr>
<tr>
<td valign="top" height="1">
<!-- ------------ INPUT FIELDS START -------------------------------------------------------------------------------------------------- -->
<!-- BELOW ARE THE 3 REQUIRED FIELDS THE USER MUST FILL IN IN ORDER TO SEND THE FORM -->
<%If UCase(Request.Form("Validated") = "VALIDATED") Then%>
<form method="POST" action="<%= Request.ServerVariables("Script_Name")%>" name="frmMain">
<input type="hidden" name="Validated" id="Validated" value="" />
<input TYPE="hidden" NAME="frmMain" VALUE="0">
<font face="Verdana, Arial, Helvetica, sans-serif" size="3">Please enter your name and the email address of yourself and your manager.</font>
<br>
<br>
<!-- 1ST FIELD IS THE USERS FULL NAME -->
<font face="Verdana, Arial, Helvetica, sans-serif" size="1">Name</font>
<font size="1">
<br>
<input type="text" name="name" size="30" style="font-family: Verdana; font-size: 10px">
<br>
</font>
</font><br><br>
<!-- 2ND FIELD IS THE USERS EMAIL ADDRESS -->
<font face="Verdana, Arial, Helvetica, sans-serif" size="1">Your Email</font>
<font size="1">
<br>
<input type="text" name="email" size="30" style="font-family: Verdana; font-size: 10px">
<br>
</font>
</font><br><br>
<!-- 3RD FIELD IS THE USERS MANAGERS EMAIL ADDRESS -->
<font face="Verdana, Arial, Helvetica, sans-serif" size="1">Managers Email</font>
<font size="1">
<br>
<input type="text" name="manager" size="30" style="font-family: Verdana; font-size: 10px">
<br>
</font>
</font><br><br>
<!-- ONCE THE USER HITS THE SUBMIT BUTTON AT THE BOTTOM OF THE PAGE, THE FORM SHOULD BE SENT
TO THE EMAIL ADDRESSES THE USER INPUT IN THE ABOVE 2 FIELDS-->
<!-- ------------ INPUT FIELDS END -------------------------------------------------------------------------------------------------- -->
<!-- ------------ BODY OF FORM START -------------------------------------------------------------------------------------------------- -->
</font></span><font size="2"><span style="font-family: Verdana"><b>1. A Sales
Competitor Analysis allows you to:</b><br>
</span></font><span lang="en-us"><font size="2">
<span style="font-family: Verdana"><input type="radio" value="V1" name="R1">a)
Forecast future business<br>
</span></font><span style="font-size: 12.0pt; font-family: Times New Roman">
<font size="2"><span style="font-family: Verdana">
<input type="radio" name="R1" value="V2">b) Talk negatively about your
competitors<br>
<input type="radio" name="R1" value="V3">c) Identify where needs are likely to
be found<br>
<input type="radio" name="R1" value="V4">d) Position your products<br>
</span></font></span></span></p>
<p class="MsoBodyText"><font size="2" face="Verdana"><b>2. Which of the
following is least important in determining how to position your
products/service?</b><br>
</font><font face="Verdana"><input type="radio" name="R2" value="V1"><span lang="en-us"><font size="2">a)
</font></span><font size="2">Identify those areas where you are strong and the
competitor is weak.<br>
</font><input type="radio" name="R2" value="V2"><span lang="en-us"><font size="2">b)
</font></span><font size="2">Identify the customer’s needs and how they are
currently being met.<br>
</font><input type="radio" name="R2" value="V3"><span lang="en-us"><font size="2">c)
</font></span><font size="2">Identify those areas in which you can
differentiate yourself from the competition.<br>
</font></font><span style="font-size: 12.0pt; font-family: Verdana">
<input type="radio" name="R2" value="V4"></span><span style="font-family: Verdana"><span lang="en-us"><font size="2">d)
</font></span><font size="2">Identify the decision-makers within the
customer’s institute.<br>
</font></span></p>
<!-- ------------ BODY OF FORM END ------------------------------------------------------------------------------------------------------ -->
<!-- ------------ SUBMIT BUTTON START -------------------------------------------------------------------------------------------------- -->
<div align="center">
<a href="javascript:DoSubmit()" class="button" style="text-decoration: none">
<font size="1">SUBMIT</font>
</a>
</div>
<!-- ------------ SUBMIT BUTTON END ----------------------------------------------------------------------------------------------------- -->
<%else SendEmailMessage()%>
</td>
</table>
</td>
</tr>
</table>
</div>
</body>
</html>
<%End If%>
<!-- ------------ SEND MAIL CODE START ----------------------------------------------------------------------------------------------------- -->
<%
Sub SendEmailMessage()
Dim objMail
Dim strBody
Set objMail= CreateObject("CDONTS.Newmail")
strBody = "<HTML>"
strBody = strBody &"<HEAD>"
strBody = strBody &"<STYLE>TD{FONT-SIZE:x-small;FONT-FAMILY:Arial}.B {font-weight:700;}.BL {font-weight:700;FONT-SIZE:small;}</STYLE>"
strBody = strBody & "</HEAD><BODY>"
strBody = strBody & "<TABLE WIDTH='100%' CELLPADDING='0'>"
strBody = strBody & "<tr><td> </td></tr>"
strBody = strBody & "<tr><td>"
strBody = StrBody & "<strong><h4>ESP Certification Results</h4></strong>" & chr(10)
strBody = strBody & "</td></tr>"
strBody = strBody & "<tr><td>"
strBody = StrBody & "<strong>Name: </strong>" & Request.Form("name") & chr(10)
strBody = strBody & "</td></tr>"
strBody = strBody & "<tr><td>"
strBody = StrBody & "<strong>Email: </strong>" & Request.Form("email") & chr(10)
strBody = strBody & "</td></tr>"
strBody = strBody & " "
strBody = strBody & "</TABLE>"
strBody = strBody & "</BODY>"
objMail.BodyFormat = 0'HTML
objMail.Body = strBody
objMail.MailFormat = 0'Mime format
objMail.Importance = 2'High
objMail.From = "ESP User"
objMail.To = Request.Form("manager") & ", " & Request.Form("name") & "<" & Request.Form("email") & ">"
objMail.Subject = "ESP User Certification Results"
objMail.Send
Set objMail = Nothing
End Sub
%>
<!-- ------------ SEND MAIL CODE END ----------------------------------------------------------------------------------------------------- -->
<!-- ------------ ERROR POP-UP START ----------------------------------------------------------------------------------------------------- -->
<script Language="Javascript">
function DoSubmit()
{
if(frmMain.name.value=="")
{
window.alert("Your Name is required before submission");
}
else
{
frmMain.Validated.value = 'Validated';
frmMain.submit()
}
}
</script>
<!-- ------------ ERROR POP-UP END ------------------------------------------------------------------------------------------------------- -->