Popup on Exit
I recently had the problem of trying to have a Popup open when a user closes a page. Knowing people in the porn biz helps ;) So this is it:
<script LANGUAGE="JavaScript">
<!--
var exit=true;
function ciao()
{
if (exit)
window.open('http://ennead.de');
}
// -->
</SCRIPT>
Then you add
onUnload=”javascript:exit=false”
to all your links to that the popup doesn’t come up when somebody clicks a link.
You’re done. Congratulations. :)
Update : Thanks to Jeremy’s comment I’ll add that you have to add a ‘onUnload=”ciao()”’ to your body tag for this to work. I almost had everyone breaking out in sweat there as it didn’t work ;)

