/    Sign up×
Community /Pin to ProfileBookmark

Pop-up help but not an AD pop-up

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>
[/CODE]

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>
[/CODE]

to post a comment
JavaScript

0Be the first to comment 😎

×

Success!

Help @daydream64 spread the word by sharing this article on Twitter...

Tweet This
Sign in
Forgot password?
Sign in with TwitchSign in with GithubCreate Account
about: ({
version: 0.1.9 BETA 5.18,
whats_new: community page,
up_next: more Davinci•003 tasks,
coming_soon: events calendar,
social: @webDeveloperHQ
});

legal: ({
terms: of use,
privacy: policy
});
changelog: (
version: 0.1.9,
notes: added community page

version: 0.1.8,
notes: added Davinci•003

version: 0.1.7,
notes: upvote answers to bounties

version: 0.1.6,
notes: article editor refresh
)...
recent_tips: (
tipper: @AriseFacilitySolutions09,
tipped: article
amount: 1000 SATS,

tipper: @Yussuf4331,
tipped: article
amount: 1000 SATS,

tipper: @darkwebsites540,
tipped: article
amount: 10 SATS,
)...