View Full Version : quiz more then one awnser

06-04-2003, 02:33 PM
hello, got this script


now i changed the questions into checkboxes , how do i make
it work if i want more then one awnser ?

correctchoices[1]='c' (and 'd' ????)


06-04-2003, 03:30 PM
First of all you have to replace the option-buttons for check-boxes, to allow multiple answers.

To check the answer i would create an array in an array.

For example... imagine, the forst question with 4 options and the option 2 and 4 are correct.

First, i create an Array with all Questions.

answers[0] <- first question
answers[1] <- second

So in answer[0], i would put another array containing the correct answers of the first question, in this case:

answer[0][0] would contain "b" or 1 (a would be 0), and answer[0][1] contains "d" or 3.

So you can check all the answers with an nice loop.


06-04-2003, 04:04 PM
thank you for the repley.
im a beginner with javascripting, damn its hard ! :)

here is what i got.


<input type="checkbox" value="a" name="question1">a) is this a question ?? <br>
<input type="checkbox" value="b" name="question1">b) is also this a question ?? <br>



How do i change this so 2 awnsers instead of 1 can be correct ?
i couldnt really understand what you ment.

06-04-2003, 06:19 PM
I do not think that script supports multiple correct answers feature. If you are not proficient with javascript your best bet is to contact the script author and ask for modifications.
If the script features and ease of quiz creation and installation are more important to you than it being free, let me know. I'm currently working on one (ETA 1 week).