[thelist] Pop-up when user leaves site.

Elfur Logadottir elfur at members.evolt.org
Mon May 21 10:14:26 CDT 2001

From: "Peter-Paul Koch" <gassinaumasis at hotmail.com>

| >Any ideas? I am thinking that using ASP I can check the new domain or IP
| >out and see if it matches my IP. If not, then do an onunload popup.
| If they leave your site your ASP won't be called so it can't do anything.

this gave me an idea that might be some kind of solution:

make a redirect page on your server and send the external links as a
querystring and leaving that redirect page throws a popup on exit.
(I don't really like that approach, but I think it works)

<tip author="elfur" type="example of external link that throws annoying
popup at you on exit">

<a href="redirect.asp?url=google.com" title="the ultimate search
engine">Google - the ultimate search engine</a>

and on redirect.asp:
strUrl = Request.QueryString(url)
response.write("<meta http-equiv=""Refresh"" content=""0; url=" & strUrl &
(I don't know the correct javascript syntax for this one, and am not really
interested in looking it up :)


More information about the thelist mailing list