thezeppzone
12-01-2004, 03:41 AM
Well, i couldnt seem to find a problem in my coding, so i dont know whats up. this used to work, but i tried it just now while redoing my site and it didnt. i formatted this quiz different than my others, but not very much different, when u click submit nothing happens. i have all my html files, my error file, everything,
linkie here (http://www.whalersfan.com/thezeppzone/quizzes/me/index.html)
html here(now that u can all see my answers lololol)
<html>
<head>
<meta http-equiv="imagetoolbar" content="no">
<title>[diminished quiz]</title>
<link href="http://www.whalersfan.com/thezeppzone/maincss.css" rel="stylesheet" type="text/css">
<SCRIPT LANGUAGE="JavaScript">
<!--
function process()
{
var great = 0;
var horrible = 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 == "3") { great++; }
for (i = 0; i < f.two.length; i++) if (f.two[i].checked) value = f.two[i].value;
if (value == "2") { great++; }
for (i = 0; i < f.three.length; i++) if (f.three[i].checked) value = f.three[i].value;
if (value == "4") { great++; }
for (i = 0; i < f.four.length; i++) if (f.four[i].checked) value = f.four[i].value;
if (value == "5") { great++; }
for (i = 0; i < f.five.length; i++) if (f.five[i].checked) value = f.five[i].value;
if (value == "1") { great++; }
if (great == 5) { out = "great" }
if (great == 4) { out = "good" }
if (great == 3) { out = "ok" }
if (great == 2) { out = "bad" }
if (great == 1) { out = "horrible" }
location.href = out + ".html";
}
function err(msg, url, line)
{
location.href = "error.html";
}
//window.onerror = err;
// -->
</SCRIPT>
</head>
<body>
<font color="#996666" size="1" face="tahoma">
<p align="left">
<b>how well do you know me</b><br><br><br>
<form name="f">
[<font color="#669966">what is my favorite sport</font>]<br>
<input type="radio" name="one" value="1"> soccer<br>
<input type="radio" name="one" value="1"> baseball<br>
<input type="radio" name="one" value="3"> hockey<br>
<input type="radio" name="one" value="4"> football<br>
<input type="radio" name="one" value="5"> basketball<br><br><br>
[<font color="#669966">what is my middle name</font>]<br>
<input type="radio" name="two" value="1"> james<br>
<input type="radio" name="two" value="2"> michael<br>
<input type="radio" name="two" value="3"> joseph<br>
<input type="radio" name="two" value="4"> thomas<br>
<input type="radio" name="two" value="5"> carl<br><br><br>
[<font color="#669966">how many people are in my family</font>]<br>
<input type="radio" name="three" value="1"> 2<br>
<input type="radio" name="three" value="2"> 3<br>
<input type="radio" name="three" value="3"> 4<br>
<input type="radio" name="three" value="4"> 5<br>
<input type="radio" name="three" value="5"> 6<br><br><br>
[<font color="#669966">what instrument do i play</font>]<br>
<input type="radio" name="four" value="1"> flute<br>
<input type="radio" name="four" value="2"> trumpet<br>
<input type="radio" name="four" value="3"> clarinet<br>
<input type="radio" name="four" value="4"> trombone<br>
<input type="radio" name="four" value="5"> saxophone<br><br><br>
[<font color="#669966">what kind of car do i want</font>]<br>
<input type="radio" name="five" value="1"> cts<br>
<input type="radio" name="five" value="2"> corvette<br>
<input type="radio" name="five" value="3"> jetta<br>
<input type="radio" name="five" value="4"> mustang<br>
<input type="radio" name="five" value="5"> hummer<br><br><br>
<input type="button" value="click me" onclick="process();">
<br><br><br><br><br><br><br><br>[<a href="javascript:history.go(-1)"
onMouseOver="self.status=document.referrer;return true">back</a>]
</p>
</font>
</body>
</html>
thanks
zeppy
linkie here (http://www.whalersfan.com/thezeppzone/quizzes/me/index.html)
html here(now that u can all see my answers lololol)
<html>
<head>
<meta http-equiv="imagetoolbar" content="no">
<title>[diminished quiz]</title>
<link href="http://www.whalersfan.com/thezeppzone/maincss.css" rel="stylesheet" type="text/css">
<SCRIPT LANGUAGE="JavaScript">
<!--
function process()
{
var great = 0;
var horrible = 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 == "3") { great++; }
for (i = 0; i < f.two.length; i++) if (f.two[i].checked) value = f.two[i].value;
if (value == "2") { great++; }
for (i = 0; i < f.three.length; i++) if (f.three[i].checked) value = f.three[i].value;
if (value == "4") { great++; }
for (i = 0; i < f.four.length; i++) if (f.four[i].checked) value = f.four[i].value;
if (value == "5") { great++; }
for (i = 0; i < f.five.length; i++) if (f.five[i].checked) value = f.five[i].value;
if (value == "1") { great++; }
if (great == 5) { out = "great" }
if (great == 4) { out = "good" }
if (great == 3) { out = "ok" }
if (great == 2) { out = "bad" }
if (great == 1) { out = "horrible" }
location.href = out + ".html";
}
function err(msg, url, line)
{
location.href = "error.html";
}
//window.onerror = err;
// -->
</SCRIPT>
</head>
<body>
<font color="#996666" size="1" face="tahoma">
<p align="left">
<b>how well do you know me</b><br><br><br>
<form name="f">
[<font color="#669966">what is my favorite sport</font>]<br>
<input type="radio" name="one" value="1"> soccer<br>
<input type="radio" name="one" value="1"> baseball<br>
<input type="radio" name="one" value="3"> hockey<br>
<input type="radio" name="one" value="4"> football<br>
<input type="radio" name="one" value="5"> basketball<br><br><br>
[<font color="#669966">what is my middle name</font>]<br>
<input type="radio" name="two" value="1"> james<br>
<input type="radio" name="two" value="2"> michael<br>
<input type="radio" name="two" value="3"> joseph<br>
<input type="radio" name="two" value="4"> thomas<br>
<input type="radio" name="two" value="5"> carl<br><br><br>
[<font color="#669966">how many people are in my family</font>]<br>
<input type="radio" name="three" value="1"> 2<br>
<input type="radio" name="three" value="2"> 3<br>
<input type="radio" name="three" value="3"> 4<br>
<input type="radio" name="three" value="4"> 5<br>
<input type="radio" name="three" value="5"> 6<br><br><br>
[<font color="#669966">what instrument do i play</font>]<br>
<input type="radio" name="four" value="1"> flute<br>
<input type="radio" name="four" value="2"> trumpet<br>
<input type="radio" name="four" value="3"> clarinet<br>
<input type="radio" name="four" value="4"> trombone<br>
<input type="radio" name="four" value="5"> saxophone<br><br><br>
[<font color="#669966">what kind of car do i want</font>]<br>
<input type="radio" name="five" value="1"> cts<br>
<input type="radio" name="five" value="2"> corvette<br>
<input type="radio" name="five" value="3"> jetta<br>
<input type="radio" name="five" value="4"> mustang<br>
<input type="radio" name="five" value="5"> hummer<br><br><br>
<input type="button" value="click me" onclick="process();">
<br><br><br><br><br><br><br><br>[<a href="javascript:history.go(-1)"
onMouseOver="self.status=document.referrer;return true">back</a>]
</p>
</font>
</body>
</html>
thanks
zeppy