2013-07-24, 10:48 AM
I need some help implanting a code on my site. It uses javascript. i am wanting to import it to mybb and use cookies so my users only see it once instead of everytime loading a page.
i am also trying to find a way to make it into a custom page using a template through mybb template system.
this is the implantation code:
also i am wanting to know how i can add cookie settings to it.
what it looks like on the site:
what it is suppose to look like:
i am also trying to find a way to make it into a custom page using a template through mybb template system.
this is the implantation code:
<script type="text/javascript">
var agreewin=dhtmlmodal.open("agreebox", "iframe", "modalfiles/agreement.htm", "This Page's Terms of service", "width=590px,height=450px,center=1,resize=1,scrolling=0", "recal")
agreewin.onclose=function(){ //Define custom code to run when window is closed
var theform=this.contentDoc.getElementById("eula") //Access form with id="eula" inside iframe
var yesbox=theform.eulabox[0] //Access the first radio button within form
var nobox=theform.eulabox[1] //Access the second radio button within form
if (yesbox.checked==true)
alert("You agreed to the terms")
if (nobox.checked==true)
alert("You havent agreed"),
window.location.href = "http://stackoverflow.com";
return true;
}
</script>
i am wanting to know is how can i get this code to work. i figured out how to show up a template in it but it just loads up to the left and not where i need it to be. also i am wanting to know how i can add cookie settings to it.
what it looks like on the site:
what it is suppose to look like: