qristopher
02-08-2006, 08:15 PM
Hey all. I have a question concerning some HTML form work. I KNOW, this is definitely not a forum for this topic, but I figure most of the people on here have a lot more experience than I, so hopefully someone can give me a hand...
I have a terms & conditions popup page with a checkbox and a button on the bottom. When you check the box and click the button, the window closes and takes you to a specific URL in a new window. Easy enough, except that I erased what I had done, and now I can't get it to do the same thing again. I'm totally at the end of my rope, and obviously fried if I can't see what mistakes I've made. Please help!!!!
<head>
<script language="JavaScript">
function checkAndSubmit()
{
if(document.form.Agree.checked)
{
document.form.submit();
window.close();
}
else
{
alert("You must agree to the Terms and Conditions to continue");
}
}
</script>
</head>
///AND///
<form action="http://www.acteva.com/booking.cfm?bevaid=104296" method="post" enctype="multipart/form-data" name="Agree" target="_blank">
<label>
<input name="Agree" type="checkbox" id="agree" value="checkbox">
</label>
<span class="body">
Check box if you agree to the Terms & Conditions
</span>
<label>
<input name="submit" type="button" value="submit" onClick="checkAndSubmit">
</label>
</form>
I have a terms & conditions popup page with a checkbox and a button on the bottom. When you check the box and click the button, the window closes and takes you to a specific URL in a new window. Easy enough, except that I erased what I had done, and now I can't get it to do the same thing again. I'm totally at the end of my rope, and obviously fried if I can't see what mistakes I've made. Please help!!!!
<head>
<script language="JavaScript">
function checkAndSubmit()
{
if(document.form.Agree.checked)
{
document.form.submit();
window.close();
}
else
{
alert("You must agree to the Terms and Conditions to continue");
}
}
</script>
</head>
///AND///
<form action="http://www.acteva.com/booking.cfm?bevaid=104296" method="post" enctype="multipart/form-data" name="Agree" target="_blank">
<label>
<input name="Agree" type="checkbox" id="agree" value="checkbox">
</label>
<span class="body">
Check box if you agree to the Terms & Conditions
</span>
<label>
<input name="submit" type="button" value="submit" onClick="checkAndSubmit">
</label>
</form>