PDA

View Full Version : Tweaking Splash Page



bradleyjond
04-21-2009, 03:01 PM
1) Script Title: Tweaking Splash Page

2) Script URL (on DD): http://www.dynamicdrive.com/dynamicindex3/dynamicsplash.htm

3) Describe problem: I have been having trouble with flash ads bleeding through the splash page. I have done the following.


1. I have made my flash ads invisible (visibility=hidden)

2. I need to make them visible again when the splash page is not supposed to load. It seems like I have the wrong path to the element. I think it is getting stuck within the iframe document and not going to my main page.

Please review my code and that you for your help =)




init:function(){
if (this.enablefrequency==1){ //if frequency control turned on
if (/sessiononly/i.test(this.displayfrequency)){ //if session only control
if (this.getCookie(this.cookiename[0]+"_s")==null){ //if session cookie is empty
this.setCookie(this.cookiename[0]+"_s", "loaded")
this.launch=true
}
}
else if (/day/i.test(this.displayfrequency)){ //if persistence control in days
if (this.getCookie(this.cookiename[0])==null || parseInt(this.getCookie(this.cookiename[0]))!=parseInt(this.displayfrequency)){ //if persistent cookie is empty or admin has changed number of days to persist from that of the stored value (meaning, reset it)
this.setCookie(this.cookiename[0], parseInt(this.displayfrequency), parseInt(this.displayfrequency))
this.launch=true
}
}
}
else //else if enablefrequency is off
this.launch=true
if (this.launch){
this.output()
if (parseInt(this.autohidetimer)>0)
setTimeout("splashpage.closeit()", parseInt(this.autohidetimer)*1000)
}else{
document.getElementById("flashad").style.visibility="visible"
}

ddadmin
04-22-2009, 05:17 PM
Your added code is in the right location actually. Are you sure the line:


document.getElementById("flashad").style.visibility="visible"

works to reveal the Flash content?