Hi!
The script below produces HTTP Error 405 (below) when I execute the function calc_score().
<form action="calc_score" method="post" name="myForm">
It is part of a quiz that is supposed to calculate the users score from ten questions. When the form is submitted a new page should appear giving the user feedback on each question. i.e :-
What the question was
What they're answer was
And the correct answer if thet got it wrong
Questions and answers are stored in array's
Error message:
HTTP Error 405
405 Method Not Allowed
The method specified in the Request Line is not allowed for the resource identified by the request. Please ensure that you have the proper MIME type set up for the resource you are requesting.
<script>
function calc_score() {
var score = 0;
<%for choice = 0 to 9 step 1%>
<html>
<body>
The question was: <=question<%=index%> <BR>
Your answer was: <=answer<%=choice%> <BR>
if (answer<%=choice%> == '<%=answer1(choice)%>')
score = score + 1;
<B>Your answer is correct</B> <BR>
else
<B>The correct answer is: </B>'<%=answer1(choice)%>' <BR>
<%next%>
</body>
</html>
}
</script>
The script below produces HTTP Error 405 (below) when I execute the function calc_score().
<form action="calc_score" method="post" name="myForm">
It is part of a quiz that is supposed to calculate the users score from ten questions. When the form is submitted a new page should appear giving the user feedback on each question. i.e :-
What the question was
What they're answer was
And the correct answer if thet got it wrong
Questions and answers are stored in array's
Error message:
HTTP Error 405
405 Method Not Allowed
The method specified in the Request Line is not allowed for the resource identified by the request. Please ensure that you have the proper MIME type set up for the resource you are requesting.
<script>
function calc_score() {
var score = 0;
<%for choice = 0 to 9 step 1%>
<html>
<body>
The question was: <=question<%=index%> <BR>
Your answer was: <=answer<%=choice%> <BR>
if (answer<%=choice%> == '<%=answer1(choice)%>')
score = score + 1;
<B>Your answer is correct</B> <BR>
else
<B>The correct answer is: </B>'<%=answer1(choice)%>' <BR>
<%next%>
</body>
</html>
}
</script>