Google Answers Logo
View Question
Q: Troubleshoot Java quiz script ( No Answer,   1 Comment )
Subject: Troubleshoot Java quiz script
Category: Computers > Algorithms
Asked by: cluelessone-ga
List Price: $10.00
Posted: 10 Jul 2005 08:06 PDT
Expires: 09 Aug 2005 08:06 PDT
Question ID: 541814
There is some problem with this quiz script. For some people it
doesn't work correctly. I changed it a little so that if people submit
more than once it still works, but still it doesn't work for some
people. what is the bug?

<!-- Begin
var ans = new Array;
var done = new Array;
var yourAns = new Array;
var explainAnswer = new Array;

var score = 0;
ans[1] = "c";
ans[2] = "a";
ans[3] = "c";
ans[4] = "c";
ans[5] = "d";
ans[6] = "c";
ans[7] = "b";
ans[8] = "a";
ans[9] = "d";
ans[10] = "b";
ans[11] = "b";
ans[12] = "a";
ans[13] = "d";
ans[14] = "c";
ans[15] = "d";
ans[16] = "a";
ans[17] = "a";
ans[18] = "b";
ans[19] = "c";
ans[20] = "d";


function Engine(question, answer) {

function Score(){
var score = 0;
var answerText = "How did you do?\n------------------------------------\n";
   answerText=answerText+"\nQuestion "+i+" ";
    answerText=answerText+"The correct answer was "+ans[i]+":
    answerText=answerText+" Correct! \n";

answerText=answerText+"\n\nYour total score is : "+score+"\n";

//now score the user
answerText=answerText+"\nComment : ";
answerText=answerText+"You're completely unqualified";
if(score>=11 && score <=14){
answerText=answerText+"You really should study up";
if(score>=15 && score <=17){
answerText=answerText+"Not too bad";
answerText=answerText+"You're a genius!";


//  End -->
There is no answer at this time.

Subject: Re: Troubleshoot Java quiz script
From: r_mckenzie-ga on 21 Jul 2005 12:37 PDT
You should make it clear that this is a JavaScript problem not a Java problem. 
- Post the context of the problem (i.e. full page)
- Explain exactly the error you are getting

Important Disclaimer: Answers and comments provided on Google Answers are general information, and are not intended to substitute for informed professional medical, psychiatric, psychological, tax, legal, investment, accounting, or other professional advice. Google does not endorse, and expressly disclaims liability for any product, manufacturer, distributor, service or service provider mentioned or any opinion expressed in answers or comments. Please read carefully the Google Answers Terms of Service.

If you feel that you have found inappropriate content, please let us know by emailing us at with the question ID listed above. Thank you.
Search Google Answers for
Google Answers  

Google Home - Answers FAQ - Terms of Service - Privacy Policy