PDA

View Full Version : I need a "what kind of X are you" script



8search
July 3rd, 2002, 15:57
I need a script like the one on this site:

http://sami.deminished.com/conetest.html

Yes, I could just copy paste the script, but I was wondering
if there was some type of generator to make these types of quizzes a little faster than doing all the coding manually?

Any help would be appreciated, thank you.

StormClouds
July 4th, 2002, 17:25
Actually, you cant copy and paste the script. Its php ;) And I think most of the people spend the time writing it themselves.

StormClouds
July 4th, 2002, 17:25
Eep, I take that back, its like Javascript or something :confused:

GregT
July 4th, 2002, 19:16
there might me a maker thing sumwhere but u should be able to just copy and paste and then edit the avascript in notepad and the rest in dreamweaver.



<SCRIPT LANGUAGE="JavaScript">
<!--
function process()
{
var orange = 0;
var blue = 0;
var mini = 0;
var wetfloor = 0;
var abused = 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") { orange++; }
if (value == "2") { blue++; }
if (value == "3") { mini++; }
if (value == "4") { wetfloor++; }
if (value == "5") { abused++; }
for (i = 0; i < f.two.length; i++) if (f.two[i].checked) value = f.two[i].value;
if (value == "1") { orange++; }
if (value == "2") { blue++; }
if (value == "3") { mini++; }
if (value == "4") { wetfloor++; }
if (value == "5") { abused++; }
for (i = 0; i < f.three.length; i++) if (f.three[i].checked) value = f.three[i].value;
if (value == "1") { orange++; }
if (value == "2") { blue++; }
if (value == "3") { mini++; }
if (value == "4") { wetfloor++; }
if (value == "5") { abused++; }
for (i = 0; i < f.four.length; i++) if (f.four[i].checked) value = f.four[i].value;
if (value == "1") { orange++; }
if (value == "2") { blue++; }
if (value == "3") { mini++; }
if (value == "4") { wetfloor++; }
if (value == "5") { abused++; }
for (i = 0; i < f.five.length; i++) if (f.five[i].checked) value = f.five[i].value;
if (value == "1") { orange++; }
if (value == "2") { blue++; }
if (value == "3") { mini++; }
if (value == "4") { wetfloor++; }
if (value == "5") { abused++; }
for (i = 0; i < f.six.length; i++) if (f.six[i].checked) value = f.six[i].value;
if (value == "1") { orange++; }
if (value == "2") { blue++; }
if (value == "3") { mini++; }
if (value == "4") { wetfloor++; }
if (value == "5") { abused++; }

var out = "orange";
i = orange;
if (blue > i) { out = "blue"; i = blue; }
if (mini > i) { out = "mini"; i = mini; }
if (wetfloor > i) { out = "wetfloor"; i = wetfloor; }
if (abused > i) { out = "abused"; i = abused; }
location.href = out + ".html";
}
function err(msg, url, line)
{
location.href = "error.html";
}
//window.onerror = err;
// -->
</SCRIPT>

8search
July 4th, 2002, 23:55
:D Thankx guys, I appreciate it!