View Full Version : Popup or under on exiting website

04-21-2009, 06:57 AM
Hi all,

I'm looking for the code that will launch a popup or popunder when a user exits a website. Sounds like it should be easy, but I can't find the code anywhere!!!

Anyone know how to check if a person has navigated away from a website, closed a tab or window?

I just want to display a short customer satisfaction survey once they've left.
Only do it once though - and set a cookie to remember that they've filled it in!

All I can find are references to 'not' doing it through fear of annoying people, but they'll only get it once, and it's just for a 14 day period to see if it works anyway!

Any ideas, I think i'm going a little insane...

Thanks in advance,

04-21-2009, 12:22 PM
This link shows you how to open another page, eg your survey, when somebody is leaving your site.

http://www.privatelabelresources.com/webmasteru/1siteExitpop.html (http://www.privatelabelresources.com/webmasteru/1siteExitpop.html)

04-21-2009, 02:01 PM
Oh no!!
That link was blocked by dynamicdrive.
Any chance you could split it up?

Many many thanks,

04-21-2009, 02:07 PM
It wasn't blocked, the user probably copied it from another thread and vBulleting usually shortens links so copying them won't always work. Nevertheless, I've fixed it now.

04-21-2009, 02:19 PM
Hi guys,
Thanks for the URL, and then the help with the URL, but that only shows me how to get it working for just 1 page.

I need it for a WHOLE SITE!!
Maybe i'm asking too much by wanting a quick-fix?

Surely there's an easier way of getting this to work with either JS or DHTML?