not enough information here to help you.
We don't know about your quiz or the formulas for your scoring so....
post some work to date and others may be able to assist on specific questions.
- Show quoted text -
The arial buttons on the html page are set to 'Correct' or 'Incorrect'
if they select the correct answer the string says 'correct'. What i
want to do is add all the correct answers together and total at the
bottom of the mail. Here is my asp script....
<%@LANGUAGE="VBSCRIPT" CODEPAGE="1252"%>
<%OPTION EXPLICIT%>
<% Response.Buffer = true %>
<%
Dim fname, man, vq1, vq2, vq3, vq4, vq5, vq6, vq7, vq8, vq9, vq10,
strBody, objMail
fname = Request.Form("name")
man = Request.Form("manager")
vq1 = Request.Form("q1")
vq2 = Request.Form("q2")
vq3 = Request.Form("q3")
vq4 = Request.Form("q4")
vq5 = Request.Form("q5")
vq6 = Request.Form("q6")
vq7 = Request.Form("q7")
vq8 = Request.Form("q8")
vq9 = Request.Form("q9")
vq10 = Request.Form("q10")
strBody = ""
strBody = strBody & "<!DOCTYPE html PUBLIC ""-//W3C//DTD XHTML 1.0
Transitional//EN"">" & vbCrlf
strBody = strBody & "<head>" & vbCrlf
strBody = strBody & "<meta http-equiv=""Content-Type"" content=""text/
html; charset=iso-8859-1"" />" & vbCrlf
strBody = strBody & "<style type=""text/css"">" & vbCrlf
strBody = strBody & "body {" & vbCrlf
strBody = strBody & "margin-left: 0px; margin-top: 0px; margin-right:
0px; margin-bottom: 0px;" & vbCrlf
strBody = strBody & "}" & vbCrlf
strBody = strBody & "#pagehead {" & vbCrlf
strBody = strBody & "font-family: ""Gill Sans""; color:
#FFFFFF; font-size: 36px;" & vbCrlf
strBody = strBody & "}" & vbCrlf
strBody = strBody & "#pagetitle {" & vbCrlf
strBody = strBody & "font-family: ""Gill Sans""; color:
#FFFFFF; font-size: 48px;" & vbCrlf
strBody = strBody & "}" & vbCrlf
strBody = strBody & "#bodytextlarge {" & vbCrlf
strBody = strBody & "color: #ccoo33; font-weight: bold; font-size:
18px; font-family: ""Gill Sans"";" & vbCrlf
strBody = strBody & "}" & vbCrlf
strBody = strBody & "#bodytext {" & vbCrlf
strBody = strBody & "color: #cc0033; font-weight: normal; font-
size: 18px;" & vbCrlf
strBody = strBody & "}" & vbCrlf
strBody = strBody & "</style>" & vbCrlf
strBody = strBody & "</head>" & vbCrlf
strBody = strBody & "<html><body>" & vbCrlf
strBody = strBody & "<table width=""100%"" cellpadding=""0""
cellspacing=""0"" border=""0"">" & vbCrlf
strBody = strBody & "<tr bgcolor=""#ccoo33"">" & vbCrlf
strBody = strBody & " <td align=""center"" valign=""top""
id=""pagetitle"" > Homeserve </td>" & vbCrlf
strBody = strBody & "</tr>" & vbCrlf
strBody = strBody & said:
Validation Quiz</td>" & vbCrlf
strBody = strBody & "</tr>" & vbCrlf
strBody = strBody & "<tr><td> </td></tr>" & vbCrlf
strBody = strBody & "<tr><td align=""center"" id=""bodytext"">The
following user submitted their validation quiz on " & now () & "</td></
tr>" & vbCrlf & vbCrlf
strBody = strBody & "<tr><td> </td></tr>" & vbCrlf
strBody = strBody & "<tr><td align=""left"" id=""bodytext"">Name: " &
fname & "</td></tr>" & vbCrlf
strBody = strBody & "<tr><td align=""left"" id=""bodytext"">Team
Manager: " & man & "</td></tr>" & vbCrlf & vbCrlf & vbCrlf
strBody = strBody & "<tr><td> </td></tr>" & vbCrlf
strBody = strBody & "<tr><td align=""left"" id=""bodytext"">Answer
1: " & vq1 & "</td></tr>" & vbCrlf & vbCrlf
strBody = strBody & "<tr><td align=""left"" id=""bodytext"">Answer
2: " & vq2 & "</td></tr>" & vbCrlf & vbCrlf
strBody = strBody & "<tr><td align=""left"" id=""bodytext"">Answer
3: " & vq3 & "</td></tr>" & vbCrlf & vbCrlf
strBody = strBody & "<tr><td align=""left"" id=""bodytext"">Answer
4: " & vq4 & "</td></tr>" & vbCrlf & vbCrlf
strBody = strBody & "<tr><td align=""left"" id=""bodytext"">Answer
5: " & vq5 & "</td></tr>" & vbCrlf & vbCrlf
strBody = strBody & "<tr><td align=""left"" id=""bodytext"">Answer
6: " & vq6 & "</td></tr>" & vbCrlf & vbCrlf
strBody = strBody & "<tr><td align=""left"" id=""bodytext"">Answer
7: " & vq7 & "</td></tr>" & vbCrlf & vbCrlf
strBody = strBody & "<tr><td align=""left"" id=""bodytext"">Answer
8: " & vq8 & "</td></tr>" & vbCrlf & vbCrlf
strBody = strBody & "<tr><td align=""left"" id=""bodytext"">Answer
9: " & vq9 & "</td></tr>" & vbCrlf & vbCrlf
strBody = strBody & "<tr><td align=""left"" id=""bodytext"">Answer
10: " & vq10 & "</td></tr>" & vbCrlf & vbCrlf & vbCrlf & vbCrlf
strBody = strBody & "<tr><td> </td></tr>" & vbCrlf
strBody = strBody & "<tr><td align=""center"" id=""bodytext"">Total
Score =...... (Out of 10) " & "</td></tr>" & vbCrlf & vbCrlf
strBody = strBody & "<tr height=""150px""><td> </td></tr>" &
vbCrlf
strBody = strBody & "</table>" & vbCrlf
strBody = strBody & "</body></html>" & vbCrlf
Set objMail = Server.CreateObject("CDO.Message")
objMail.To = "(e-mail address removed)"
'ObjMail.Cc = "(e-mail address removed)"
objMail.From = "(e-mail address removed)"
objMail.Subject = "Homeserve Validation Quiz"
objMail.HTMLBody = strBody
objMail.Send
Set objMail = Nothing
Response.Redirect ("frame.html")
%>
This is part of my HTML script....
<form id="form1" name="form1" method="post" action="hs.asp">
<table width="100%" border="1">
<tr>
<td width="19%"><strong>Name</strong></td>
<td width="25%"><input name="name" type="text" id="name" /></
td>
<td width="56%" bgcolor="#CCCCCC"> </td>
</tr>
<tr>
<td><strong>Team Manager </strong></td>
<td><input name="manager" type="text" id="manager" /></td>
<td bgcolor="#CCCCCC"> </td>
</tr>
</table>
<table width="100%" border="1">
<tr>
<td bgcolor="#CCCCCC"> </td>
</tr>
<tr>
<td class="style2">Q1. <a
href="mailto:
[email protected]"
title="mailto:
[email protected]" class="style4">When are
Landlord’s Safety checks carried out?</a></td>
</tr>
<tr>
<td><p class="style3">
<input name="q1" type="radio" value="A -Correct" />
All year round</p>
<p class="style3">
<input name="q1" type="radio" value="B -Incorrect" />
April to September</p>
<p class="style3">
<input name="q1" type="radio" value="C -Incorrect" />
October to March</p> </td>
</tr>
<tr>
<td bgcolor="#CCCCCC"><span class="style3"></span></td>
</tr>
<tr>
<td class="style3"><strong>Q2. How much is the cover limit
for Chem Dry emergency repairs?</strong></td>
</tr>
<tr>
<td><p class="style3">
<input name="q2" type="radio" value="A -Incorrect" />
£300</p>
<p class="style3">
<input name="q2" type="radio" value="B -Correct" />
£500</p>
<p class="style3">
<input name="q2" type="radio" value="C -Incorrect" />
£1000</p> </td>
</tr>
<tr>
<td bgcolor="#CCCCCC"><span class="style3"></span></td>
</tr>
<tr>
<td class="style3"><strong>Q3. If a Lloyds TSB Easy Home
Warranty Policy cannot be found using the Post Code search what
contact number should you call for customer service? </strong></td>
</tr>
<tr>
<td><p class="style3">
<input name="q3" type="radio" value="A -Incorrect" />
02476 527839</p>
<p class="style3">
<input name="q3" type="radio" value="B -Incorrect" />
02476 572128</p>
<p class="style3">
<input name="q3" type="radio" value="C -Correct" />
02476 527812</p>
</td>
</tr>
<tr>
<td bgcolor="#CCCCCC"><span class="style3"></span></td>
</tr>
<tr>
<td class="style3"><strong>Q4. If a Customer calls to
request a check be carried out on ‘Water Damaged
Electrics’, what should you advise the customer?</strong></td>
</tr>
<tr>
<td><p class="style3">
<input name="q4" type="radio" value="A -Correct" />
We can’t send ops out until the electrics have been
given time to dry out</p>
<p class="style3">
<input name="q4" type="radio" value="B -Incorrect" />
Unless there’s an Electrical breakdown we
won’t send an engineer out</p>
<p class="style3">
<input name="q4" type="radio" value="C -Incorrect" />
Customer will need to claim for flood damaged electrics
from their Household insurers </p>
</td>
</tr>
<tr>
<td bgcolor="#CCCCCC"><span class="style3"></span></td>
</tr>
<tr>
<td class="style3"><strong>Q5. When further work is
identified during a routine service and the boiler is found to be
‘Beyond repair’ Which department deals with it?
<em> </em></strong></td>
</tr>
<tr>
<td><p class="style3">
<input name="q5" type="radio" value="A -Incorrect" />
CAD Gas</p>
<p class="style3">
<input name="q5" type="radio" value="B -Correct" />
Deployment</p>
<p class="style3">
<input name="q5" type="radio" value="C -Incorrect" />
Customer relations</p> </td>
</tr>
<tr>
<td bgcolor="#CCCCCC"><span class="style3"></span></td>
</tr>
<tr>
<td class="style3"><strong>Q6. Which of the following Post
Codes does NOT come within the M25 Zone?</strong></td>
</tr>
<tr>
<td><p class="style3">
<input name="q6" type="radio" value="A -Incorrect" />
RH1 - 9</p>
<p class="style3">
<input name="q6" type="radio" value="B -Incorrect" />
GU1 - 5</p>
<p class="style3">
<input name="q6" type="radio" value="C -Correct" />
MK1 - 4</p> </td>
</tr>
<tr>
<td bgcolor="#CCCCCC"><span class="style3"></span></td>
</tr>
<tr>
<td><span class="style3"><strong>Q7. </strong></
span><strong>What must you enter in the Customer’s Reference
field when recording a Chem Dry claim?</strong></td>
</tr>
<tr>
<td><p class="style3">
<input name="q7" type="radio" value="A -Incorrect" />
Customer’s Reference</p>
<p class="style3">
<input name="q7" type="radio" value="B -Incorrect" />
We don’t handle Chem Dry claims</p>
<p class="style3">
<input name="q7" type="radio" value="C -Correct" />
Chem Dry reference</p> </td>
</tr>
<tr>
<td bgcolor="#CCCCCC"><span class="style3"></span></td>
</tr>
<tr>
<td class="style3"><strong>Q8.</strong> <strong>How many new
‘Repudiated’ Category / Subjects are there in Impact?</
strong></td>
</tr>
<tr>
<td><p class="style3">
<input name="q8" type="radio" value="A -Incorrect" />
6</p>
<p class="style3">
<input name="q8" type="radio" value="B -Correct" />
8</p>
<p class="style3">
<input name="q8" type="radio" value="C -Incorrect" />
10</p> </td>
</tr>
<tr>
<td bgcolor="#CCCCCC"><span class="style3"></span></td>
</tr>
<tr>
<td class="style3"><strong>Q9. When a Fixed Rate Plumbing
Contractor calls from site with a subsequent job, how much can he
expect to be paid for this 2nd Job?</strong></td>
</tr>
<tr>
<td><p class="style3">
<input name="q9" type="radio" value="A -Incorrect" />
£48</p>
<p class="style3">
<input name="q9" type="radio" value="B -Incorrect" />
£15</p>
<p class="style3">
<input name="q9" type="radio" value="C -Correct" />
£36</p> </td>
</tr>
<tr>
<td bgcolor="#CCCCCC"><span class="style3"></span></td>
</tr>
<tr>
<td class="style3"><strong>Q10. What is the waiting period
from the initial commencement of a Lloyds TSB Easyhome Warranty
policy before a claim can be made</strong><strong>?</strong></td>
</tr>
<tr>
<td><p class="style3">
<input name="q10" type="radio" value="A -Incorrect" />
14 days</p>
<p class="style3">
<input name="q10" type="radio" value="B -Correct" />
30 days</p>
<p class="style3">
<input name="q10" type="radio" value="C -Incorrect" />
28 days</p> </td>
</tr>
</table>
<p>
<input name="Submit" type="submit"
onclick="YY_checkform('form1','q1[0]','#q','2','Please answer question
1','q1[2]','#q','2','Field \'q1[2]\' is not
valid.','q2[0]','#q','2','Please answer question
2','q3[0]','#q','2','Please answer Q3','q4[0]','#q','2','Please answer
question 4','q5[0]','#q','2','Please answer question
5','q6[0]','#q','2','Please answer question
6','q7[0]','#q','2','Please answer question
7','q8[0]','#q','2','Please answer question
8','q9[0]','#q','2','Please answer question
9','q10[0]','#q','2','Please answer question
10','name','#q','0','Please enter your
name','manager','#q','0','Please enter your Team Managers
name');return document.MM_returnValue" value="Submit" />
</p>
<p> </p>
</form>
I hope this makes more sense. Can anyone help please?
Thanks
Kate