Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 1 of 1
11-08-2012, 11:19 PM #1
- Join Date
- Nov 2012
- Thanked 0 Times in 0 Posts
Please help me out, i need help with this code.I attached this function to the on-click event of a button I need it to automatically write a new question to the page after checking the answer of the previous question, without reloading the page.I need it to loop continuously to the end of the questions array. Please help me out.
var answer = 0;
while (document.QuestionForm.radQuestionChoice[answer].checked != true)
answer = String.fromCharCode(65 + answer);
if (answerCorrect (questionNumber, answer) == true)
alert("Wrong answer. " + answers[questionNumber] + " is the right answer.");
for (var qCounter = 0;qCounter < questions.length; qCounter++)
document.getElementById('questionDisplay').innerHTML = "";