Click to See Complete Forum and Search --> : onbeforeunload alternatives?


bellefaith
03-25-2006, 06:58 PM
I want to have my website display a popup window when a visitor leaves my website.

I have seen numerous examples that use onbeforeunload to popup a page when the visitor leaves the page. However, onbeforeunload still creates a popup if the visitor hits the back button or the refresh button in their browser.

Is there an alternative to onbeforeunload so that popups only pop up when a visitor leaves my domain completely?

For example, if a visitor is on my website and reloads the page or clicks the back button to go back to another page of my website, I don't want him to see the popup. But if a visitor on my website goes to google.com, I would like the popup to appear.

Thank you.

A1ien51
03-25-2006, 07:25 PM
POP UP BLOCKERS WILL BLOCK IT SO DO NOT WASTE YOUR TIME!

Eric