skateordie_girl
06-24-2004, 07:39 PM
I'm making a quiz, and I think I did everything right, but it's not working. Here is the main page, can anyone help and see why it isn't working? Thanks so much.
<html>
<head>
<title>++++++++ BrokenStarDust Version 12</title>
<SCRIPT LANGUAGE="JavaScript">
<!--
function process()
{
var person1 = happy;
var person2 = sad;
var person3 = popular;
var person4 = you;
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") { happy++; }
if (value == "2") { sad++; }
if (value == "3") { popular++; }
if (value == "4") { you++; }
for (i = 0; i < f.two.length; i++) if
(f.two[i].checked) value = f.two[i].value;
if (value == "1") { happy++; }
if (value == "2") { sad++; }
if (value == "3") { popular++; }
if (value == "4") { you++; }
for (i = 0; i < f.three.length; i++) if
(f.three[i].checked) value = f.three[i].value;
if (value == "1") { happy++; }
if (value == "2") { sad++; }
if (value == "3") { popular++; }
if (value == "4") { you++; }
for (i = 0; i < f.four.length; i++) if
(f.four[i].checked) value = f.four[i].value;
if (value == "1") { happy++; }
if (value == "2") { sad++; }
if (value == "3") { popular++; }
if (value == "4") { you++; }
for (i = 0; i < f.five.length; i++) if
(f.five[i].checked) value = f.five[i].value;
if (value == "1") { happy++; }
if (value == "2") { sad++; }
if (value == "3") { popular++; }
if (value == "4") { you++; }
var out = "happy";
i = happy;
if (sad > i) { out = "sad"; i = sad; }
if (popular > i) { out = "popular"; i = popular; }
if (you > i) { out = "you"; i = you; }
location.href = out + ".htm";
}
function err(msg, url, line)
{
location.href = "error.html";
}
//window.onerror = err;
// -->
</SCRIPT>
</head>
<style type="text/css">
A {text-decoration: none; font-weight:bold; color: #000000;}
A:visited {text-decoration: font-weight:bold; none; color: #000000;}
A:active {text-decoration: none; font-weight:bold; color: #0000000;}
A:hover {color: #000000; text-decoration: none; font- cursor: crosshair; }
<!--
body
{ background-color: white;
scrollbar-face-color:#FE588A;
scrollbar-arrow-color:#FE588A;
scrollbar-track-color:#ffffff;
scrollbar-shadow-color:#FE588A;
scrollbar-highlight-color:#ffffff;
scrollbar-3dlight-color:#FE588A;
scrollbar-darkshadow-Color:#ffffff;
}
-->
<!--
body,tr,td
{font-size: 7pt;
font-family: verdana;
color:#000000;
line-height:12px;
letter-spacing:0pt}
-->
<!--
input, textarea
{color: #000000;
background: FE588A;
font-size: 10px;
font-weight: none;
text-decoration: none;
font-family: verdana;
text-align: left;
border-width: 1px;
border-style: solid;
border-color:#000000;}
-->
<!--BODY {
color:#000000;
font-size:7pt;
font-family:verdana;
font-weight:normal;
background-color: white;
background-attachment : fixed;
</style>
<body>
<form name="f">
<b>1. Imagine you're driving. You just ran over a dog. What do you do?</B><br />
<input type="radio" name="one" value="1">Oh, I'll just keep on going my wonderful day!<br />
<input type="radio" name="one" value="2">Oh my god, are you serious? *cries*<br />
<input type="radio" name="one" value="3">Pssht, whatever. Maybe he deserved to die. I'll just keep on driving.<br />
<input type="radio" name="one" value="4">Wow, that sucks. Maybe I'll bring him home and make a proper burial<br />
<p>
<b>2. Favorite TV Show?</B><br />
<input type="radio" name="two" value="1">South Park. I LOVE comedy, because laughing is so fun!<br />
<input type="radio" name="two" value="2">Not really a TV show, but I like watching the news. It can be depressing, though.<br />
<input type="radio" name="two" value="3">I really don't have time to watch TV<br />
<input type="radio" name="two" value="4">This may be kind of embarassing, but Lizzie Mcguire<br />
<p>
<b>3. Which Genre of music can you most relate to?</B><br />
<input type="radio" name="three" value="1">Well, I make my own music. One with lyrics that aren't so depressing!<br />
<input type="radio" name="three" value="2">Metal. The lyrics go along with my tears<br />
<input type="radio" name="three" value="3">Pop music. Because, hey, I am beautiful, in every single way. And words can't bring me down.<br />
<input type="radio" name="three" value="4">Techno. I like how different it is.<br />
<p>
<b>4. What do you think of yourself?</B><br />
<input type="radio" name="four" value="1">Happy!!!<br />
<input type="radio" name="four" value="2">I hate myself.<br />
<input type="radio" name="four" value="3">I'm very good looking. I'm not conceited, but come on...if you've got it, flaunt it.<br />
<input type="radio" name="four" value="4">Maybe a little weird, but I like it that way.<br />
<p>
<b>5. You just got the chance to be famous, and star in a movie that will probably make millions. It has been your dream your entire life. But there's one problem; you have to be completely naked for one scene. Will you do it?</B><br />
<input type="radio" name="five" value="1">Oh gosh, I don't know!<br />
<input type="radio" name="five" value="2">Maybe. But who'd want to look at me naked?<br />
<input type="radio" name="five" value="3">Of course! Money, fame, and guys drooling over me? Where can I sign?<br />
<input type="radio" name="five" value="4">No way, I wouldn't sell myself out like that.<br />
<p>
<input type="button" value="Clickee!" onclick="process();">
</body>
</html>
<html>
<head>
<title>++++++++ BrokenStarDust Version 12</title>
<SCRIPT LANGUAGE="JavaScript">
<!--
function process()
{
var person1 = happy;
var person2 = sad;
var person3 = popular;
var person4 = you;
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") { happy++; }
if (value == "2") { sad++; }
if (value == "3") { popular++; }
if (value == "4") { you++; }
for (i = 0; i < f.two.length; i++) if
(f.two[i].checked) value = f.two[i].value;
if (value == "1") { happy++; }
if (value == "2") { sad++; }
if (value == "3") { popular++; }
if (value == "4") { you++; }
for (i = 0; i < f.three.length; i++) if
(f.three[i].checked) value = f.three[i].value;
if (value == "1") { happy++; }
if (value == "2") { sad++; }
if (value == "3") { popular++; }
if (value == "4") { you++; }
for (i = 0; i < f.four.length; i++) if
(f.four[i].checked) value = f.four[i].value;
if (value == "1") { happy++; }
if (value == "2") { sad++; }
if (value == "3") { popular++; }
if (value == "4") { you++; }
for (i = 0; i < f.five.length; i++) if
(f.five[i].checked) value = f.five[i].value;
if (value == "1") { happy++; }
if (value == "2") { sad++; }
if (value == "3") { popular++; }
if (value == "4") { you++; }
var out = "happy";
i = happy;
if (sad > i) { out = "sad"; i = sad; }
if (popular > i) { out = "popular"; i = popular; }
if (you > i) { out = "you"; i = you; }
location.href = out + ".htm";
}
function err(msg, url, line)
{
location.href = "error.html";
}
//window.onerror = err;
// -->
</SCRIPT>
</head>
<style type="text/css">
A {text-decoration: none; font-weight:bold; color: #000000;}
A:visited {text-decoration: font-weight:bold; none; color: #000000;}
A:active {text-decoration: none; font-weight:bold; color: #0000000;}
A:hover {color: #000000; text-decoration: none; font- cursor: crosshair; }
<!--
body
{ background-color: white;
scrollbar-face-color:#FE588A;
scrollbar-arrow-color:#FE588A;
scrollbar-track-color:#ffffff;
scrollbar-shadow-color:#FE588A;
scrollbar-highlight-color:#ffffff;
scrollbar-3dlight-color:#FE588A;
scrollbar-darkshadow-Color:#ffffff;
}
-->
<!--
body,tr,td
{font-size: 7pt;
font-family: verdana;
color:#000000;
line-height:12px;
letter-spacing:0pt}
-->
<!--
input, textarea
{color: #000000;
background: FE588A;
font-size: 10px;
font-weight: none;
text-decoration: none;
font-family: verdana;
text-align: left;
border-width: 1px;
border-style: solid;
border-color:#000000;}
-->
<!--BODY {
color:#000000;
font-size:7pt;
font-family:verdana;
font-weight:normal;
background-color: white;
background-attachment : fixed;
</style>
<body>
<form name="f">
<b>1. Imagine you're driving. You just ran over a dog. What do you do?</B><br />
<input type="radio" name="one" value="1">Oh, I'll just keep on going my wonderful day!<br />
<input type="radio" name="one" value="2">Oh my god, are you serious? *cries*<br />
<input type="radio" name="one" value="3">Pssht, whatever. Maybe he deserved to die. I'll just keep on driving.<br />
<input type="radio" name="one" value="4">Wow, that sucks. Maybe I'll bring him home and make a proper burial<br />
<p>
<b>2. Favorite TV Show?</B><br />
<input type="radio" name="two" value="1">South Park. I LOVE comedy, because laughing is so fun!<br />
<input type="radio" name="two" value="2">Not really a TV show, but I like watching the news. It can be depressing, though.<br />
<input type="radio" name="two" value="3">I really don't have time to watch TV<br />
<input type="radio" name="two" value="4">This may be kind of embarassing, but Lizzie Mcguire<br />
<p>
<b>3. Which Genre of music can you most relate to?</B><br />
<input type="radio" name="three" value="1">Well, I make my own music. One with lyrics that aren't so depressing!<br />
<input type="radio" name="three" value="2">Metal. The lyrics go along with my tears<br />
<input type="radio" name="three" value="3">Pop music. Because, hey, I am beautiful, in every single way. And words can't bring me down.<br />
<input type="radio" name="three" value="4">Techno. I like how different it is.<br />
<p>
<b>4. What do you think of yourself?</B><br />
<input type="radio" name="four" value="1">Happy!!!<br />
<input type="radio" name="four" value="2">I hate myself.<br />
<input type="radio" name="four" value="3">I'm very good looking. I'm not conceited, but come on...if you've got it, flaunt it.<br />
<input type="radio" name="four" value="4">Maybe a little weird, but I like it that way.<br />
<p>
<b>5. You just got the chance to be famous, and star in a movie that will probably make millions. It has been your dream your entire life. But there's one problem; you have to be completely naked for one scene. Will you do it?</B><br />
<input type="radio" name="five" value="1">Oh gosh, I don't know!<br />
<input type="radio" name="five" value="2">Maybe. But who'd want to look at me naked?<br />
<input type="radio" name="five" value="3">Of course! Money, fame, and guys drooling over me? Where can I sign?<br />
<input type="radio" name="five" value="4">No way, I wouldn't sell myself out like that.<br />
<p>
<input type="button" value="Clickee!" onclick="process();">
</body>
</html>