Forum Moderators: open
Add this function in <head> section of document:
function CommitMarketingSuicide ()
{
PopUp = window.open('irritate_many_users_who_wont_come_back.html',
'Rude','toolbar=no,location=no,directories=no,status=no,scrollbars=yes,
copyhistory=no,resizable=yes,width=480,height=360,left=10,top=10');
PopUp.focus();
}
Add "onunload" call to <body> tag of document:
<body onunload="javascript:CommitMarketingSuicide()" text="#000000" bgcolor="#FFFFFF" link="#000099" vlink="#330066" alink="#FF0000" marginheight="0" marginwidth="0" topmargin="0" leftmargin="0" rightmargin="0">
The names of the function and the popup window were carefully selected to express my thoughts on popups, but it is functioning code, so now you have an answer... ;)
Be advised that the newest browsers support built-in pop-up killers, and the days of the pop-up are numbered. We can all thank X10 for the new browser support available now in Opera and Mozilla. Typically, once a site throws an unsolicited popup at me, I never go back, so please consider this carefully.
Jim
[edited by: tedster at 11:38 pm (utc) on Sep. 29, 2002]
[edit reason] fix side scroll [/edit]
"The onUnload JavaScript event is most often used to open pop-up windows as you leave a page, which can be an annoyance. The following feature will clear the onUnload event after loading each page."
[ ] Suppress the onUnload JavaScript event
The only time I have found the exit popup useful was when I abandoned a shopping cart and it offered me a 15% discount on my total.
p.s. is the width of this specific web page wacky for anyone else?
I have used the onunload feature to close an opt-in popup on one of my sites when the user closes or leaves the main page. It saves the annoyance of having to close the popup manually. IMHO, popups have their place as "more information" windows, but I've never used them except in cases where the user knows a new window will pop up if he/she clicks on a link.
This page is wide because of the long unbroken line in the js function in my post above.
Jim
p.s. is the width of this specific web page wacky for anyone else?
I *might* forgive a site that offered me a steep discount on unpurchased shopping-cart items for the popup when I bailed. If I even saw the popup. Or I might get pissed that they tried to take me for 18% more than they were willing to sell for.