Single Personality Quiz

This quiz has no right and wrong answers. Instead each answer belongs to one of four different "personalities". A separate count of the number of answers selected for each "personality" will be kept and at the a different results pages will be displayed depending on which "personality" got the most answers. If results are evenly split between two or more personalities then one will be selected at random.

Step One - Fill out the following form for each question that you want to contain within your quiz. Each time you press the "Add Question" button the code in the textarea immediately below will be updated to add the new question and answers to those you have already added to the quiz. Once you have all your questions entered highlight the content of the text area and copy/paste it into a new JavaScript file (eg. pquizhead.js).

Personality A Answer
Personality B Answer
Personality C Answer
Personality D Answer
Personality E Answer
Personality F Answer
This entry contains HTML code.
Results Page Prefix: [abcdef].htm

Step Two - add the following code immediately before the </head> tag in the page where you want the quiz displayed.

<script src="pquizhead.js" type="text/javascript"></script>

Step Three - copy/paste the following script and save it as pquizbody.js.


Step Four - attach this script into the body of your question page where you want the quiz question to appear using:

<script src="pquizbody.js" type="text/javascript"></script>

Step Five - the quiz redirects to an answer page at the end of the script with the specific answer page it redirects to being determined by the answers selected during the quiz. The answer pages will all start with the value you entered as analPage in the first form and will have a single letter between 'a' and 'f' on the end. So if you entered 'quizresult' as the prefix for the page names the six pages you need for the results are quizresulta.htm, quizresultb.htm, quizresultc.htm, quizresultd.htm, quizresulte.htm, and quizresultf.htm. Which of these will be displayed depends on which of the 'personalities' received the highest number of answers. If two or more received the same number of answers then one of those will be selected at random.


This article written by Stephen Chapman, Felgall Pty Ltd.

go to top

FaceBook Follow
Twitter Follow