Forum Moderators: open
does anyone know how I can only make it pop up once per user or only if they are closing the page entirely, or leaving my domain entirely?...please let me know.
Thanks,
Joshua
...
<script type="text/javascript">
exited = 0;
function popup() {
if(exited) {...}
}
</script>
</head>
<body onunload="popup()">
<a href="internal.html" onclick="exited=0">Internal link</a>
<a href="http://www.example.com" onclick="exited=1">External link</a>
1) joshuaip, as a visitor to your site, I wouldn't see your pop-up unless I'd explicitly allowed it. Nor would most users of a non-Microsoft browser. When the next version (or service pack) of Internet Explorer comes out, neither will most Microsoft users. So, there's not a lot of point wasting your time on this now.
2) A number of surveys have been done that show users hate popups. We're talking 90%+ here, and some users will avoid your site as a consequence. A mac site [lowendmac.com] came up first when I searched about this topic, but it looks pretty typical.
3) Adding scripts to your pages will make them larger, load and run slower, make them more fragile, and increase your maintenance workload. They also won't work in some browsers, since some users disable some annoying aspects of Javascript (this can easily be done in Mozilla Firebird), or disable it altogether.
YouDonkey.com [youdonkey.com] has an article about 10 Easy Steps to lose your customers [youdonkey.com], which repeats common knowledge but is still worth a look. Ironically, the page contains some scripting that prevented me from using a mouse-gesture to navigate back to Google. They just lost my custom, and I only looked at one page.
To summarize, I think it's a bad idea, though others may beg to differ. Provide a link that people can click to subscribe -- even with a pop-up window (onclick) if you like -- but don't force it onto users.
Hemebond and Asquithea, you guys might want to check out some of these threads debating the merits of popups. Lots of good arguments to be found here:
[webmasterworld.com...]
[webmasterworld.com...]
[webmasterworld.com...]