I have a window that pop-ups when the index page loads.
In the pop-up is a disclaimer and when you click on the checkbox “I Agree” and submit it will bring you to our home web page. This works fine but I want another checkbox so that if someone “Disagrees” with the disclaimer they will be redirected to another web page.
Please please help. I really need this to work. Thanks
Here is my code
[CODE]
<script>
var checkobj
function agreesubmit(el){
checkobj=el
if (document.all||document.getElementById){
for (i=0;i<checkobj.form.length;i++){ //hunt down submit button
var tempobj=checkobj.form.elements[i]
if(tempobj.type.toLowerCase()==”submit”)
tempobj.disabled=!checkobj.checked
}
}
}
function defaultagree(el){
if (!document.all&&!document.getElementById){
if (window.checkobj&&checkobj.checked)
return true
else {alert(‘Please Accept our Disclaimer to continue’)
return false
}
}
}
// End –>
</script>
<SCRIPT LANGUAGE=”JavaScript”>
var destination=””;
function redirect()
{
window.open (“/kmat/english/index.shtml”);
window.close()
}
// End –>
</script>
and the table
[CODE]
<form method=”post” name=”disclaimer” onSubmit=”returndefaultagree(this)” action=”javascript:redirect()”>
<iframe name=”agreement” src=”agreement.htm” border=”0″
frameborder=”0″ marginwidth=”5″ marginheight=”5″ width=”600″
height=”250″ style=”border: 3px solid #294A63″>
<p>Your browser does not support inline frames or is currently configured not to display inline frames.</p>
</iframe>
<p><input name=”agreecheck” value=”agree” type=”checkbox”
onClick=”agreesubmit(this)”>I agree to the above Disclaimer</p>
<input type=”Submit” value=”Continue” disabled></form>
<script>
document.forms.agreeform.agreecheck.checked=false
</script>