Google
 

nifty little exit pop-up script

From: Wolter Tjeenk Willink <wolter_at_tjeenkwillink.com>
Date: Wed 14 Mar 2001 18:19:15 -0600

In reply to the discussion about the advantage and
disadvantages of exit windows, we've written a small
piece of javascript that will deal with most of the
cons.

Once implemented in your coding, it will place a cookie
on the visitors machine at pop-up a small window, which
can be used to dispat your special offer or a bookmark
prompt. Whenever the visitor returns to your site, it
will find the cookie so that it knowns not to display
the pop-up window again.

Here's the coding. Cut 'n paste the head section into
the head section of your document, and the onload
event handler into the body section of your page, and
that's it.

Best wishes,

Wolter Tjeenk Willink
Tjeenk Willink Consultancy
Almere, The Netherlands

Webdesign, webpromotion and webmarketing
<a href="http://www.tjeenkwillink.com"></a>


<HEAD>

<SCRIPT LANGUAGE="JavaScript">

<!-- Developed by: Tjeenk Willink Consultancy -->
<!-- -->

<!-- Begin
var expDays = 1; // number of days the cookie should be placed on your
visitor' computer

var page = "only-popup-once.html";
var windowprops =
"width=300,height=200,location=no,toolbar=no,menubar=no,scrollbars=no,resiza
ble=yes";

function GetCookie (name) {
var arg = name + "=";
var alen = arg.length;
var clen = document.cookie.length;
var i = 0;
while (i < clen) {
var j = i + alen;
if (document.cookie.substring(i, j) == arg)
return getCookieVal (j);
i = document.cookie.indexOf(" ", i) + 1;
if (i == 0) break;
}
return null;
}
function SetCookie (name, value) {
var argv = SetCookie.arguments;
var argc = SetCookie.arguments.length;
var expires = (argc > 2) ? argv[2] : null;
var path = (argc > 3) ? argv[3] : null;
var domain = (argc > 4) ? argv[4] : null;
var secure = (argc > 5) ? argv[5] : false;
document.cookie = name + "=" + escape (value) +
((expires == null) ? "" : ("; expires=" + expires.toGMTString())) +
((path == null) ? "" : ("; path=" + path)) +
((domain == null) ? "" : ("; domain=" + domain)) +
((secure == true) ? "; secure" : "");
}
function DeleteCookie (name) {
var exp = new Date();
exp.setTime (exp.getTime() - 1);
var cval = GetCookie (name);
document.cookie = name + "=" + cval + "; expires=" + exp.toGMTString();
}
var exp = new Date();
exp.setTime(exp.getTime() + (expDays*24*60*60*1000));
function amt(){
var count = GetCookie('count')
if(count == null) {
SetCookie('count','1')
return 1
}
else {
var newcount = parseInt(count) + 1;
DeleteCookie('count')
SetCookie('count',newcount,exp)
return count
   }
}
function getCookieVal(offset) {
var endstr = document.cookie.indexOf (";", offset);
if (endstr == -1)
endstr = document.cookie.length;
return unescape(document.cookie.substring(offset, endstr));
}

function checkCount() {
var count = GetCookie('count');
if (count == null) {
count=1;
SetCookie('count', count, exp);

window.open(page, "", windowprops);

}
else {
count++;
SetCookie('count', count, exp);
   }
}
// End -->
</script>

<!-- Insert the onLoad event handler into your BODY tag -->

<BODY OnLoad="checkCount()">

<!-- Script Size: 2.58 KB -->



Wolter Tjeenk Willink
Tjeenk Willink Consultancy

Truffautstraat 17
1325 PR Almere

Tel: 06-26702467
URL: http://www.tjeenkwillink.com
     http://www.tjeenkwillink.nl

Webdesign, webpromotie & webmarketing diensten



Received on Wed Mar 14 2001 - 18:19:15 CST


HOW TO JOIN THE ONLINE ADVERTISING DISCUSSION LIST

With an archive of more than 14,000 postings, since 1996 the Online Advertising Discussion List has been the Internet's leading forum focused on professional discussion of online advertising and online media buying and selling strategies, results, studies, tools, and media coverage. If you wish to join the discussion list, please use this link to sign up on the home page of the Online Advertising Discussion List.

 


Online Advertising Industry Leaders:

Clicksor
List and Found
AdJungle
The Laredo Group

Add your company...

Laredo Group Interactive Advertising Training
AdJungle
List and Found
Clicksor
 



 


 
Online Advertising Discussion List Archives: 2003 - Present
Online Advertising Discussion List Archives: 2001 - 2002
Online Advertising Discussion List Archives: 1999 - 2000
Online Advertising Discussion List Archives: 1996 - 1998

Online Advertising Home | Guidelines | Conferences | Testimonials | Contact Us | Sponsorship | Resources
Site Access and Use Policy | Privacy Policy

 
2323 Clear Lake City Blvd., Suite 180-139, Houston, TX 77062-8120
Phone: 281-480-6300
 
Copyright 1996-2007 The Online Advertising Discussion List, a division of ADASTRO Incorporated.
All Rights Reserved.

Visit our other web sites:
Tennis Server | Tennis Server Ticket Exchange | MyCityRocks | MyCityRocks Ticket Exchange