[QUOTE]
// JavaScript Document
function NoRadioButtonChecked(grp)
{
var x, len = grp.length;
for(x=0; x<len; ++x)
if(grp[x].checked) break;
if(x<len) return false;
alert(“No radio button checked in the ‘” + grp[0].name + “‘ group.”);
grp[0].focus();
return true;
}
function Project()
{
if (NoRadioButtonChecked(Quiz.Background) return false;
if (NoRadioButtonChecked(Quiz.Mouse) return false;
if (NoRadioButtonChecked(Quiz.ctrl) return false;
if (NoRadioButtonChecked(Quiz.Mac) return false;
if (NoRadioButtonChecked(Quiz.leet) return false;
if (NoRadioButtonChecked(Quiz.cmd) return false;
if (NoRadioButtonChecked(Quiz.microsoft) return false;
if (NoRadioButtonChecked(Quiz.browser) return false;
if (NoRadioButtonChecked(Quiz.video) return false;
if (NoRadioButtonChecked(Quiz.quiz) return false;
var a1 = (Quiz.Background[2].checked) ? 1 : 0;
var b1 = (Quiz.Mouse[2].checked) ? 1 : 0;
var c1 = (Quiz.ctrl[0].checked) ? 1 : 0;
var d1 = (Quiz.Mac[0].checked) ? 1 : 0;
var e1 = (Quiz.leet[2].checked) ? 1 : 0;
var f1 = (Quiz.cmd[2].checked) ? 1 : 0;
var g1 = (Quiz.microsoft[3].checked) ? 1 : 0;
var h1 = (Quiz.browser[3].checked) ? 1 : 0;
var i1 = (Quiz.video[0].checked) ? 1 : 0;
var j1 = (Quiz.quiz[1].checked) ? 1 : 0;
var total = a1 + b1 + c1 + d1 + e1 + f1 + g1 + h1 + i1 + j1;
if (total == 0 || total == 1 || total == 2)
{
document.writeln(“You are a <h1><p>Novice.</h1></p><br> Your score was ” +total+ “…. You know absolutely nothing about computers”);
}
else
if (total == 3 || total == 4 || total == 5)
{
document.writeln(“You are an <h1><p>Intermediate.</h1></p><br> Your score was ” +total+ ” … You know some things about computers<p><a href=”Project 3.html”>Return to Home</a></p> “);
}
else
if (total == 6 || total == 7 || total == 8)
{
document.writeln(“You are an <h1><p>Expert.</h1></p><br> Your score was ” +total+ ” …You know almost everything about computers<p><a href=”Project 3.html”>Return to Home</a></p>”);
}
else
if (total == 9 || total == 10)
{
document.writeln(“You are a <h1><p>God.</h1></p><br> Your score was ” +total+ ” …You know everything there is to know about computers<p><a href=”Project 3.html”>Return to Home</a></p>”);
}
}
I commented out this part.
[QUOTE]
if (NoRadioButtonChecked(Quiz.Background) return false;
if (NoRadioButtonChecked(Quiz.Mouse) return false;
if (NoRadioButtonChecked(Quiz.ctrl) return false;
if (NoRadioButtonChecked(Quiz.Mac) return false;
if (NoRadioButtonChecked(Quiz.leet) return false;
if (NoRadioButtonChecked(Quiz.cmd) return false;
if (NoRadioButtonChecked(Quiz.microsoft) return false;
if (NoRadioButtonChecked(Quiz.browser) return false;
if (NoRadioButtonChecked(Quiz.video) return false;
if (NoRadioButtonChecked(Quiz.quiz) return false;
and the script ran fine, however, it didnt alert the user. Now when I get rid of the comments it doesnt run at all. So that means the code above was the problem. If anyone could help me out to tell me what is wrong. Thanks in advance.