manxman
04-29-2004, 12:13 AM
This may be a daft question, but I have written a form that asks the user to choose an option from a series of drop down lists such as:
<FORM METHOD="POST" action="newsafety.asp" webbot-action="--WEBBOT-SELF--">
<input TYPE="hidden" NAME="VTI-GROUP" VALUE="0"><P>
Choose one of the following options:</P>
<BLOCKQUOTE>
<p>Is there a suitable updated and reviewed Health & Safety Plan and does it
refer to MCG Safety Strategy and methods of consultation?</p>
<p><select NAME="1" size="1">
<option SELECTED value="0">No H&S plan at all
<option value="1">Significant amount of H&S plan incomplete
<option value="2">H&S plan in place but not reviewed or small amount incomplete
<option value="3">H&S plan in place, reviewed on a quarterly basis
<option value="4">Plan in place, reviewed monthly
</select><br>
</p>
The answers are then stored in a database and the final confirmation field will display the questions and selected answers together as a certificate.
It is intended to be used as an online site tool for conducting safety audits around our water treatment works (the current test version is here (without final confirmation page) http://www.hmballiance.com/newsafety/newsafety.asp ).
The above all works fine, however, I would like to display a running score on the page as the user works through the questions. I am relatively new to ASP so it might something that is really simple, however I have searched for days to find a solution, to no avail.
The closest I have come is adding <% score = score + 1 %> etc for each option, and <% response.write "Your score is (score) %> at the end, however this just seems to total the score as if every option has been selected (i.e. score = 10 for the above example).
Is there a solution?
<FORM METHOD="POST" action="newsafety.asp" webbot-action="--WEBBOT-SELF--">
<input TYPE="hidden" NAME="VTI-GROUP" VALUE="0"><P>
Choose one of the following options:</P>
<BLOCKQUOTE>
<p>Is there a suitable updated and reviewed Health & Safety Plan and does it
refer to MCG Safety Strategy and methods of consultation?</p>
<p><select NAME="1" size="1">
<option SELECTED value="0">No H&S plan at all
<option value="1">Significant amount of H&S plan incomplete
<option value="2">H&S plan in place but not reviewed or small amount incomplete
<option value="3">H&S plan in place, reviewed on a quarterly basis
<option value="4">Plan in place, reviewed monthly
</select><br>
</p>
The answers are then stored in a database and the final confirmation field will display the questions and selected answers together as a certificate.
It is intended to be used as an online site tool for conducting safety audits around our water treatment works (the current test version is here (without final confirmation page) http://www.hmballiance.com/newsafety/newsafety.asp ).
The above all works fine, however, I would like to display a running score on the page as the user works through the questions. I am relatively new to ASP so it might something that is really simple, however I have searched for days to find a solution, to no avail.
The closest I have come is adding <% score = score + 1 %> etc for each option, and <% response.write "Your score is (score) %> at the end, however this just seems to total the score as if every option has been selected (i.e. score = 10 for the above example).
Is there a solution?