More Quiz Problems

admin

Administrator
Staff member
I'm currently working on a quiz, and while I can get it to display the first set of results, it won't display the other options. Here is my code for that section of the code, if you need more, please let me know. All it will display is the results for if quizScore==0 || quizScore<=2 irregardless of what the score is.

<script language="javascript">
var DisplayResults = "";
function resultDisplay() {
if (quizScore==0 || quizScore<=2) {
DisplayResults = "Hypnosis may not be for you. You may find it hard to enter a trance and may have trouble responding to hypnotic suggestion.";
document.quiz.result.value = DisplayResults;

} else
if (quizScore==3 || quizScore<=7) {
DisplayResults = "You're somewhere in the middle. While you should have no difficulty being hypnotized, you may not be susceptible to every suggestion.";
document.quiz.result.value = DisplayResults;
} else {
DisplayResults = "Not only will you have no problem going under, but you should respond well to most hypnotic suggestions. Who knows? Hypnosis may help you get through your next root canal.";
document.quiz.results.value= DisplayResults;
}
}

</script>
 
Back
Top