Java
Scripts
Cookie controlled popup page on exit.
Handy
Tip : Newer browers are incorporating a popup killer which
could make the use of web page popups a thing of the past. Don't
place inportant information in popups as this could now go totally
unnoticed.
Popup window on exit. Cookie
controlled javascript
I
know, I know....we hate them.
Personally I do think popups have their place. For example, they can be
very handy in getting a subscriber to your newsletter at the very last minute.
It works the same way as candy at the supermarket checkout. You were not
going to buy candy, but since they were there you grabbed one anyway. Why
not =)
Here are a couple of tips which can make yours work
better than the average popup...
1.
It's a good idea to make it come up on exit so visitors are not immediately hit
with it.
2. Have it controlled with a cookie so that visitors
get it just once within any single day, no matter how many times they exit your
page. This is especially important if you are going to add a popup to your site
to try and entice more opt-in subscribers to your newsletters,
I highly suggest you set it up like that. Otherwise popups can be aggravating
and counterproductive.
Popup script on
exit
First you need to
make up a new wepage, with a simple message you want the popup on exit
window to contain. For example, I have made one for this page about joining
my newsletter which you will see when exiting this page.
The script below is controlled by a cookie, so your visitors are not hassled
everytime they leave your page. You can set the number of days the cookie
should last by editing the 3rd line. You will also need to change
the width, height and page name attributes in lines 4 and 5 to
suit.
Place this script straight after the body tag in your html:
You will then need to add a body OnUnLoad within the beginning of your body tag
like so: