I'm currently stuck on a page I am making that uses JavaScript.
Here is the code-
<html>
<head>
<title>Quiz Page #2 || It's Impossible</title>
</head>
<body>
<body bgcolor="black">
<font color="red" face="Verdana"<center><h1>The Unbeatable Quiz!</font></center></h1>
<br />
<!--Home--><left><a><a href="index.html"><img src="draft\home pic.jpg"></a></left>
<br />
<!--Start Quiz--><left></left>
<br />
<!--What is the test?--><left></left>
<br />
<!--Rate The Quiz--><left></left>
<center>
<font color="red"><b>Is your number less than 15?</b></font>
<form name="thirty_half">
<p><input type="radio" name="yesno" value="input_0" size=10><font color="Red"><b>Yes</b></font></p>
<p><input type="radio" name="yesno" value="input_1" size=10><font color="Red"><b>No</b></font></p>
<br />
<br />
<input type="button" value="Continue" onClick="check()">
<br />
<br />
</form>
<script type= text/javascript>
function check()
{
if(document.thirty_half.yesno[0].checked)
{
confirm("You are gonna lose!");
window.location = 'quiz3.html'
}
}
</script>
</body>
</html>
How do I make it so that if the user checks "No", presses continue and then the page switches to another one? I can only do this for one option at a time (which currently the Yes option is the only one that works.
Here is the code-
<html>
<head>
<title>Quiz Page #2 || It's Impossible</title>
</head>
<body>
<body bgcolor="black">
<font color="red" face="Verdana"<center><h1>The Unbeatable Quiz!</font></center></h1>
<br />
<!--Home--><left><a><a href="index.html"><img src="draft\home pic.jpg"></a></left>
<br />
<!--Start Quiz--><left></left>
<br />
<!--What is the test?--><left></left>
<br />
<!--Rate The Quiz--><left></left>
<center>
<font color="red"><b>Is your number less than 15?</b></font>
<form name="thirty_half">
<p><input type="radio" name="yesno" value="input_0" size=10><font color="Red"><b>Yes</b></font></p>
<p><input type="radio" name="yesno" value="input_1" size=10><font color="Red"><b>No</b></font></p>
<br />
<br />
<input type="button" value="Continue" onClick="check()">
<br />
<br />
</form>
<script type= text/javascript>
function check()
{
if(document.thirty_half.yesno[0].checked)
{
confirm("You are gonna lose!");
window.location = 'quiz3.html'
}
}
</script>
</body>
</html>
How do I make it so that if the user checks "No", presses continue and then the page switches to another one? I can only do this for one option at a time (which currently the Yes option is the only one that works.


















