what is wrong with my script

wxdqz

New Member
what i want is if you get one wrong you go to alert.htm and if you get them all right you go to home.htm








<script language=javascript>

questions = new Array("who gave frodo the one ring ?:",
"who did sam talk about often:","what color did gandoulf origonally wear:","what color did the ring wraiths wear:",
"who is an evil wizard saruman or saruon:","Quick beam was a tree ---:","who sent the felloship of the rings:",
"what was perigins last name:","was a hobbit turned bad:","aragorns other name:");

answers = new Array("bilbo","gaffer","grey","black","saruman","ent","elrond","took","gollum","strider");
x=0;
correct=0;
incorrect=0;
password=null;
do
{
password=prompt(questions[x],"")
if(password!=null && password.toLowerCase()==answers[x])

{
correct++;
}else{
incorrect++;
}
x++;

} while(x<questions.length)
if (incorrect != "1","2","3","4","5","6","7","8","9","10") {
location.href= "alert.htm";
}

if (location.href !="alert.htm") {
location.href= "home.htm";
}

</script>
 
Back
Top