I'm trying to create a page that has a button at the end with a check box before it. Unless the check box is checked, it shouldn't carry through with the link. I absolutely cannot get it to work. I've been toying around with it for over a half hour now and can't get it working. I'm not sure that I actually need the <form> elements in there since it's not actually a form, but I can't begin to conceive how to make it work without the <form> elements, though. Here's what I've come up with at this point:
<!accept.html>
<html>
<head><title>Agreement Page</title>
<script type="text/javascript">
<!-- HIDE FROM IMCOMPATIBLE BROWSERS
function submitForm() {
var submitForm = false;
if (document.forms[0].accept.value == "")
window.alert("You must agree with the above items in order to utilize the statistics form.");
return false;
else {
return true;
}
}
// STOP HIDING FROM INCOMPATIBLE BROWSERS -->
</script></head>
<body bgcolor="#CCCCCC">
<p><div align="center"><font size="4" face="Garramond">Before you go any further, you need to read the following and agree to it.<br />Otherwise, you cannot utilize the statistics form.</font></div></p><br /><br />
<p><font size="2" face="Arial">
<ul>
<li>These pages have been developed for educational purposes only.</li>
<li>No profit is intended to be made.</li>
<li>The images contained herein are property of the National Football Leauge, the NFL Players Association, and the Dallas Cowboys.<br />The use of them is not intended as copyright infringement.</li>
<li>These pages are not intended to aid or promote illegal gambling. By using them, you (the user) will not try and accomplish this means.</li>
</ul>
</font></p><br /><br />
<p>Do you accept the terms as outlined above?<br />
<form action="" method="post" onsubmit="return confirmSubmit();">
<input type="checkbox" name="accept" value="Accepted" />I Accept<br /><br />
<input type="button" name="proceed" value="Proceed" onclick=window.location="nflStats.html";>
</form></p>
</body>
</html>