Quiz Maker 3 Script
3. Question Head Script
Join the Discussion
More of this Feature
Question Body Script Alternate Body Answer Head Script Random Quiz Addon
Quizes
Enter the questions and answers for your quiz into the form below (if the advertising scripts on this page stop the form from working then use this copy of the form). You need to indicate which answer is correct by selecting the radio button to the left of that answer. You also need to enter the filename of the page that is to be displayed if the correct answer is chosen. Once you have entered a question and four alternative answers one of which is correct then select the "Add Question" button.
Continue adding as many questions and answers as you require. You can add as many as you like but if you add too many then your quiz page may take a long time to load.
The script code for the quiz will appear in the text box below with an additional statement being added for each question you add. Don't worry if you make a mistake as you can always delete lines from the resulting code if you want to remove questions. If you decide you want to start over, simply refresh the current page.
Note that the answer pages will need to have Javascript added to them to link them back into the quiz so if your web hosting setup requires a particular naming convention for pages using Javascript then you will need to keep this in mind when specifying the answer page names here.
Once you have finished entering your questions and answers, copy the code from the above text box and save it as a file called quizhead.js. You can rearrange the lines if you want to change the order of the questions or delete lines to remove questions you decide not to include. The only limitations are that you cannot change the first line of the code and you must have at least one question for the quiz script to work.
You now add this quiz to the head section of the page where the quiz is to appear using the following code:
type="text/javascript">
</script>
If you are creating more than one quiz then you can use different names for the files where you save the quizes as long as they end in .js and that you modify the code going into the head of the individual quiz pages to reference the appropriate quiz files you have created. The code that you place into the body of each quiz page will be the same for each quiz.
Of course each answer page needs to link back to the quiz question page to display the next question. We will handle this by placing a script into each answer page.

