JustSara
July 10th, 2003, 01:53 PM
This is the code after I've done some customizing. I figured out how to size the Exit window but I can't figure out how to size the Load Window (the window that pops up after a specificed time). I'd also like the popup to be on top of the browser NOT underneath it and I'd like the Exit window to pop up after the visitor has left the website not just the page they were on. Any suggestions...
==============================================
var isNN, isIE, loadURLs=new Array(), loadTimes=new Array(), exitURL, loadURLno=0, scriptID, cookieVRFY;
//set by user
scriptID='exitPopup';
cookieVRFY=1;
AddLoad('/script_helpyou.php',120);
AddExit('/script_goodbye.php');
//////////////////////////////////////////////
/// (c) 2001 ASCRIPTS.COM // do not remove! //
//////////////////////////////////////////////
function AddLoad(sURL,iTime)
{
loadURLs[loadURLno]=sURL;
loadTimes[loadURLno]=iTime;
loadURLno++;
}
function AddExit(sURL)
{
exitURL=sURL;
}
if (parseInt(navigator.appVersion) >= 4) {
if (navigator.appName == "Netscape") {
isNN = true;
} else {
isIE = true;
}
}
function errorIgnore(e) { return true; }
function openLoadWin() {
var oldtime=0,mywins;
for (mywins=0;mywins<loadURLno;mywins++)
{
setTimeout("window.open('"+loadURLs[mywins]+"','Loadwin"+mywins+"');self.focus();",(oldtime+loadTimes[mywins])*1000+10);
oldtime+=loadTimes[mywins];
}
return true;
}
function openExitWin() {
if (exitURL!='')
{
var ExitWin = window.open(exitURL,'ExitWin',"width=350,height=250");
self.focus();
}
return true;
}
if ( (cookieVRFY!=1) || (document.cookie.indexOf( scriptID+'PopupPRO=' )==-1) )
{
window.onerror = errorIgnore;
if (isNN) {
document.captureEvents(Event.UNLOAD | Event.LOAD | Event.ERROR | Event.CLICK);
}
openLoadWin();
window.onunload=openExitWin;
if (cookieVRFY==1){
document.cookie=scriptID+'PopupPRO=HeyGuys!;path=/';
}
}
==============================================
var isNN, isIE, loadURLs=new Array(), loadTimes=new Array(), exitURL, loadURLno=0, scriptID, cookieVRFY;
//set by user
scriptID='exitPopup';
cookieVRFY=1;
AddLoad('/script_helpyou.php',120);
AddExit('/script_goodbye.php');
//////////////////////////////////////////////
/// (c) 2001 ASCRIPTS.COM // do not remove! //
//////////////////////////////////////////////
function AddLoad(sURL,iTime)
{
loadURLs[loadURLno]=sURL;
loadTimes[loadURLno]=iTime;
loadURLno++;
}
function AddExit(sURL)
{
exitURL=sURL;
}
if (parseInt(navigator.appVersion) >= 4) {
if (navigator.appName == "Netscape") {
isNN = true;
} else {
isIE = true;
}
}
function errorIgnore(e) { return true; }
function openLoadWin() {
var oldtime=0,mywins;
for (mywins=0;mywins<loadURLno;mywins++)
{
setTimeout("window.open('"+loadURLs[mywins]+"','Loadwin"+mywins+"');self.focus();",(oldtime+loadTimes[mywins])*1000+10);
oldtime+=loadTimes[mywins];
}
return true;
}
function openExitWin() {
if (exitURL!='')
{
var ExitWin = window.open(exitURL,'ExitWin',"width=350,height=250");
self.focus();
}
return true;
}
if ( (cookieVRFY!=1) || (document.cookie.indexOf( scriptID+'PopupPRO=' )==-1) )
{
window.onerror = errorIgnore;
if (isNN) {
document.captureEvents(Event.UNLOAD | Event.LOAD | Event.ERROR | Event.CLICK);
}
openLoadWin();
window.onunload=openExitWin;
if (cookieVRFY==1){
document.cookie=scriptID+'PopupPRO=HeyGuys!;path=/';
}
}