Click to See Complete Forum and Search --> : Navigating away from my site


mortehl
10-09-2003, 11:28 AM
Hi there,

I am running a site that is completely driven by cookies and PHP.

I want to pop up a window whenever someone either:

1) Navigates away from my domain (eg when someone goes away from my site to another, hits thier home button, etc)

2) Closes the web browser.


Is there any pre-existing javascript code that can point me in the right direction, or perhaps a tutorial?

The problem with OnUnload is that it runs when someone goes to a different page even if it is within my own domain.

Thank you!