Javascript Exit Popup
My team has been looking for some good exit popup code for a client and found it hard to find code that would pop an exit popup when a user was leaving the page without also calling the popup when users clicked internal links. With that said I searched google for:
- code for exit popup
- code for smart exit popup
- code for smart exit popup javascript
Before finally hitting the right answer with:
The first result from Gath Adams hits the nail right on the head: Code the perfect Exit Popup
I did notice a syntax error on line 36
alert(’Here is your popup!);
is missing the closing quote – so it should be:
alert(’Here is your popup!’);
Otherwise, his code works great. Thanks Gath (pronounced Garth)!
August 16th, 2009 at 6:12 pm
Glad you found it useful.
Thanks for the info on the syntax error. I had fixed it up a while ago, but I had to restore posts from a backup & now the bug is back!
Cheers,
Gath
August 20th, 2009 at 2:03 am
The only trouble is that is not a real popup. It’s just a dialogue box. We want real popup that can’t be blocked.
Thanks,
August 23rd, 2009 at 12:33 pm
Good…..
August 30th, 2009 at 1:34 am
thanks. i use this code. i follow you…
October 12th, 2009 at 10:49 am
I’m actually anti pop up !
November 24th, 2009 at 4:22 am
thnaks for sharing
February 10th, 2010 at 5:46 pm
Thanks for sharing Java exit popup code.
I am also java developer and it would be definitely help me out.
Its come only trouble that is not real popup.
Thank
Infant Baby Bedding