|
|
|
Create
Custom Quizzes
STEP 1: Copy the following code in its entirty to you editor
(notepad, frontpage, dreamweaver, etc...)
CODE |
<html>
<head>
<title>YOUR QUIZ TITLE</title>
<SCRIPT LANGUAGE="JavaScript">
<!--
function process()
{
var OPTION1 = 0;
var OPTION2 = 0;
var OPTION3 = 0;
var OPTION4 = 0;
var f = document.f;
var i = 0;
for (i = 0; i < f.one.length; i++) if (f.one[i].checked)
value = f.one[i].value;
if (value == "1") { OPTION1++; }
if (value == "2") { OPTION2++; }
if (value == "3") { OPTION3++; }
if (value == "4") { OPTION4++; }
for (i = 0; i < f.two.length; i++) if (f.two[i].checked)
value = f.two[i].value;
if (value == "1") { OPTION1++; }
if (value == "2") { OPTION2++; }
if (value == "3") { OPTION3++; }
if (value == "4") { OPTION4++; }
for (i = 0; i < f.three.length; i++) if (f.three[i].checked)
value = f.three[i].value;
if (value == "1") { OPTION1++; }
if (value == "2") { OPTION2++; }
if (value == "3") { OPTION3++; }
if (value == "4") { OPTION4++; }
for (i = 0; i < f.four.length; i++) if (f.four[i].checked)
value = f.four[i].value;
if (value == "1") { OPTION1++; }
if (value == "2") { OPTION2++; }
if (value == "3") { OPTION3++; }
if (value == "4") { OPTION4++; }
for (i = 0; i < f.five.length; i++) if (f.five[i].checked)
value = f.five[i].value;
if (value == "1") { OPTION1++; }
if (value == "2") { OPTION2++; }
if (value == "3") { OPTION3++; }
if (value == "4") { OPTION4++; }
for (i = 0; i < f.six.length; i++) if (f.six[i].checked)
value = f.six[i].value;
if (value == "1") { OPTION1++; }
if (value == "2") { OPTION2++; }
if (value == "3") { OPTION3++; }
if (value == "4") { OPTION4++; }
var out = "OPTION1";
i = OPTION1;
if (OPTION1 > i) { out = "OPTION1"; i =
OPTION1; }
if (OPTION2 > i) { out = "OPTION2"; i =
OPTION2; }
if (OPTION3 > i) { out = "OPTION3"; i =
OPTION3; }
if (OPTION4 > i) { out = "OPTION4"; i =
OPTION4; }
location.href = out + ".html";
}
function err(msg, url, line)
{
location.href = "error.html";
}
//window.onerror = err;
// -->
</SCRIPT>
</head>
<body bgcolor="FFFFFF">
<!--PUT YOUR QUESTIONS AND ANSWERS HERE. CHANGE
EVERY QUESTION AND ANSWER. TRY NOT TO SWITCH THEM
AROUND IF YOU DO NOT KNOW JAVASCRIPT WELL. -->
</center></center>
<form name="f">
</font><font
color="black"><b>QUESTION</b><br>
<input type="radio" name="one"
value="1">YOUR ANSWER 1<br>
<input type="radio" name="one"
value="2">YOUR ANSWER 2<br>
<input type="radio" name="one"
value="3">YOUR ANSWER 3<br>
<input type="radio" name="one"
value="4">YOUR ANSWER 4<br>
<br><br>
</font>
<font
color="black"><b>QUESTION</b><br>
<input type="radio" name="two"
value="1">YOUR ANSWER 1<br>
<input type="radio" name="two"
value="2">YOUR ANSWER 2<br>
<input type="radio" name="two"
value="3">YOUR ANSWER 3<br>
<input type="radio" name="two"
value="4">YOUR ANSWER 4<br>
</font>
<br><br>
<font
color="black"><b>QUESTION</b><br>
<input type="radio"
name="three" value="1">YOUR
ANSWER 1<br>
<input type="radio"
name="three" value="2">YOUR
ANSWER 2<br>
<input type="radio"
name="three" value="3">YOUR
ANSWER 3<br>
<input type="radio"
name="three" value="4">YOUR
ANSWER 4<br>
</font><br><br>
<font
color="black"><b>QUESTION</b><br>
<input type="radio" name="four"
value="1">YOUR ANSWER 1<br>
<input type="radio" name="four"
value="2">YOUR ANSWER 2<br>
<input type="radio" name="four"
value="3">YOUR ANSWER 3<br>
<input type="radio" name="four"
value="4">YOUR ANSWER 4<br>
</font>
<br><br>
<font
color="black"><b>QUESTION</b><br>
<input type="radio" name="five"
value="1">YOUR ANSWER 1<br>
<input type="radio" name="five"
value="2">YOUR ANSWER 2<br>
<input type="radio" name="five"
value="3">YOUR ANSWER 3<br>
<input type="radio" name="five"
value="4">YOUR ANSWER 4<br>
<font
color="black"><b>QUESTION</b><br>
<input type="radio" name="six"
value="1">YOUR ANSWER 1<br>
<input type="radio" name="six"
value="2">YOUR ANSWER 2<br>
<input type="radio" name="six"
value="3">YOUR ANSWER 3<br>
<input type="radio" name="six"
value="4">YOUR ANSWER 4<br>
<br>
<input type="button" value=" CLICK
" onclick="process();"><br><br><br>
</body>
</html>
|
STEP 2:
Change the OPTIONs to the options for your quizzes. For
example, if one of the outcomes for your quiz is "Xtasy
is a pimp", then change OPTION1 to Xtasy is a pimp. You
must also make a subpage for your results. If someone gets the
option "Xtasy is a pimp", then you must make a
subpage named Xtasy is a pmp.html. It MUST have the extension
.html. Change where it says QUESTION and YOUR ANSWER to your
questions and answers to the quiz.
Tutorial By Xtasy
|
|