Set everything up as normal for a once per session box. In the configuration set your two pages here:
Code:
var interstitialBox={
//1) list of files on server to randomly pick from and display
displayfiles: ['samplecontent.htm', 'samplecontent2.htm'],
Make the first one be the one you want shown onload, the second one the survey.
Then find these functions and make the highlighted changes:
Code:
closeit:function(){
this.interVeil.style.display="none"
this.interContainer.style.display="none"
if (this.disablescrollbars && window.XMLHttpRequest) //if disablescrollbars enabled and modern browsers- IE7, Firefox, Safari, Opera 8+ etc
this.standardbody.style.overflow="auto"
if (typeof this.timervar!="undefined") clearTimeout(this.timervar)
this.ajaxconnect(this.displayfiles[1], this.interContainer);
},
Code:
initialize:function(){
this.createcontainer() //write out interstitial container
this.ajaxconnect(this.displayfiles[0], this.interContainer) //load page into content via ajax
this.dotask(window, function(){interstitialBox.hidescrollbar(); interstitialBox.getscrollbarwidth(); setTimeout("interstitialBox.showcontainer()", 100)}, "load")
this.dotask(window, function(){interstitialBox.showcontainer()}, "resize")
}
At the very end of the script, add this code:
Code:
;(function(box){
if(!box.launch){
return;
}
setTimeout(function(){
box.hidescrollbar();
box.getscrollbarwidth();
setTimeout(function(){
box.showcontainer();
box.interVeil.style.display='';
box.interContainer.style.display='';
}, 100);
}, 60 * 2000);
})(interstitialBox);
The above will launch your first one onload, and the second after 2 minutes. Both will only be once per session.
Bookmarks