Tutorials
How to make a quiz?
It might seem hard to make a quiz, but once you get the hang of it it's quite easy
- Copy this code and put it between the <head> and </head> of your HTML page
- Copy the next code and put it somewhere between the <body> and </body> of your page.
- The <font color="black"> before the quiz questions gives the colors for the questions. You can change it in the color you want.
- Go to the first code of the quiz, where it says this:
var out = "name1";
i = person1;
if (person2 > i) { out = "name2"; i = person2; }
if (person3 > i) { out = "name3"; i = person3; }
if (person4 > i) { out = "name4"; i = person4; }
if (person5 > i) { out = "name5"; i = person5; }
location.href = out + ".htm";
This means that your visitor will be redirected to the page where he will find his quizresult. I think it's easiest if you make 5 .htm pages with a similar name.
What you need to do is change the text in blue in the name you're gonna give the result pages
for instance for the meomi quiz:
var out = "meomi1";
i = person1;
if (person2 > i) { out = "meomi2"; i = person2; }
if (person3 > i) { out = "meomi3"; i = person3; }
if (person4 > i) { out = "meomi4"; i = person4; }
if (person5 > i) { out = "meomi5"; i = person5; }
location.href = out + ".htm";
}
- Think of what characters will be the results and give them a number. Put these on a piece of paper. For instance my meomi quiz:
-Bubble Cat > 1
-Chop Suey > 2
-Cassette cat > 3
-Fly Away Mouse > 4
-Karaoke Cutie > 5
- Now you're ready to make the questions.
You can put the questions and answers in the code you placed in the body of your htm document:
<p>
<font color="black">Insert 1st Question Here</font><br><br>
<input type="radio" name="one" value="1">Insert 1st Answer Here<br>
<input type="radio" name="one" value="2">Insert 2nd Answer Here<br>
<input type="radio" name="one" value="3">Insert 3rd Answer Here<br>
<input type="radio" name="one" value="4">Insert 4th Answer Here<br>
<input type="radio" name="one" value="5">Insert 5th Answer Here<br>
</p>
The answers should refer to the characters in your quiz. So the 1st answer should have to do with person 1, in my case Bubble cat. The second answer refers to person 2, in my case Chop Suey etc.
For instance:
<font color="black">Where would you like to be?</font><br>
<input type="radio" name="one" value="1">In bed.<br>
<input type="radio" name="one" value="2">In the kitchen.<br>
<input type="radio" name="one" value="3">At a concert.<br>
<input type="radio" name="one" value="4">Under a rainbow.<br>
<input type="radio" name="one" value="5">In a karaoke bar.<br>
- Once you've have made all the questions and answers it's best when you mix the answers up a bit, so it doesn't look too obvious who it may be.
For instance with the first question I mixed the 4th and 1st answer:
<font color="black">Where would you like to be?</font><br>
<input type="radio" name="one" value="4">Under a rainbow.<br>
<input type="radio" name="one" value="2">In the kitchen.<br>
<input type="radio" name="one" value="3">At a concert.<br>
<input type="radio" name="one" value="1">In bed.<br>
<input type="radio" name="one" value="5">In a karaoke bar.<br>
Do this for all the answers, just put the answers in various orders.
- Make the pictures for the quizresults. Foor instance in Photoshop or Paint Shop pro, so you can easily make the pictures in the
same size and put text on it. Place each picture on a different html page
and name these pages after the names you gave them in the code.(see
step 4)
For instance for the meomi quiz the first outcome (person 1) is Bubble cat. So the page meomi1.htm has the picture with bubble cat on it.
The second outcome (person 2) is is Chop Suey. So page meomi2.htm has the picture with Chop Suey on it etc.
- On the result pages ask
people to link the picture back to your site. Place the url so it's
easy for your visitor to copy.
For instance:
Please link this picture back to: http://www.yourwebsitehere.com so other people can take this quiz.
- Adding Persons:
if you want to delete/add more characters, just copy the if (value == "#") { name++; }part and change the name and number (If you had 5 to do, the next # would be 6, then 7 and so on...). But if you want to get rid of some, just delete the if (value == "#") { name++; }parts until you're down to the number you need. Make sure you do this for every question, but on the last one, edit if (name> i) { out = "name"; i = name; }instead.