random quiz - learning...

wxdqz

New Member
ok the attached file is the html file i'm using...

I'm trying to get a quiz working that will randomize the 4 answers to each of 10 questions..

got this to work with a for loop etc...

but can only click 1 answer in the hole quiz... becouse of the 'name' part...
document.write("<input type='radio' <!-- m --><a class="postlink" href="vhttp://www.webdeveloper.com/forum/archive/index.php/alue='a'">vhttp://www.webdeveloper.com/forum/arch ... p/alue='a'</a><!-- m --> name='question'+yy+'>")

trying to get it to work with question1, question2, etc
the yy var being the counter from the for loop

also keeping track of the right answer, dose the 'value' do this as i have done here...

any tips help....

i still need to do the code to give a score at the end.... next step... but at this time knowing which answer is the right one will do..

the data in the js file is just the data as follow
question.
right answer
wrong answer
wrong answer
wrong answerquestion.
right answer
wrong answer
wrong answer
wrong answer
etc.. for the 10 questions
 
Back
Top