Auto close/timed close or display once per session for interstitial?

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

Auto close/timed close or display once per session for interstitial?

sdmag
I uploaded the file, just in case: interstitial.html

Hi all,

I'm using Shadowbox.js to display an interstitial ad on our website through DFP, as a Third-Party Code creative. It works great, you can see it here: http://sandiegomagazine.com/.
I would like to either have shadowbox close after 10 seconds, or display once per browser session. Can you help? I would be much obliged.

Thank you for your response and time.
Salvatore


My code is below, and is being funneled through a 1x1 ad placement through DoubleClick for Publishers.

I put the following code in:

<link rel="stylesheet" type="text/css" href="http://sandiegomagazine.com/interstitial/shadowbox.css">
<script type="text/javascript" src="http://sandiegomagazine.com/interstitial/shadowbox.js"></script>
<script type="text/javascript"> Shadowbox.init({ skipSetup: true }); window.onload = function() { Shadowbox.open({ content: '<div id="advertisement-shadowbox" style="color: white; padding: 15px;"><a href="%%CLICK_URL_ESC%%https://secure2.palmcoastd.com/pub/sdgm/suball.asp" target="_blank"><img src="http://sandiegomagazine.com/interstitial/ads/valentinesinterstitial.jpg"/></a></div>', player: "html", handleOversize: "resize", title: "Advertisement", height: 420, width: 590 }); }; </script>
Reply | Threaded
Open this post in threaded view
|

Re: Auto close/timed close or display once per session for interstitial?

sdmag
Apologies for the pasted code, I wasn't quite sure how and had trouble trying to format it. Could you add the proper code to my sample? Thank you.
Reply | Threaded
Open this post in threaded view
|

Re: Auto close/timed close or display once per session for interstitial?

sdmag
In reply to this post by sdmag
OK, pasting the code one more time, hope I get an answer or reply. Much obliged. I need to set a cookie to have it appear once during a users session, or a timed close (10 seconds):


	<!-- loading external files -->
<link rel="stylesheet" type="text/css" href="http://sandiegomagazine.com/interstitial/shadowbox.css">
<script type="text/javascript" src="http://sandiegomagazine.com/interstitial/shadowbox.js"></script>

<script type="text/javascript">
Shadowbox.init({
    // let's skip the automatic setup because we don't have any
    // properly configured link elements on the page
    skipSetup: true
});

window.onload = function() {

	
    // open a welcome message as soon as the window loads
    Shadowbox.open({
        content:    '<div id="advertisement-shadowbox" style="color: white; padding: 15px;"><a href="%%CLICK_URL_ESC%%https://secure2.palmcoastd.com/pub/sdgm/suball.asp" target="_blank"><img src="http://sandiegomagazine.com/interstitial/ads/valentinesinterstitial.jpg"/></a></div>',
        player:     "html",
        handleOversize: "resize",
        title:      "Advertisement",
        height:     420,
        width:      590
    });
  
};
</script>