it is possible, not with onunload, but only if the user clicks on a link.
this will probably only work in IE also...
but here is the concept.. if you want code.. i'll write it out later.
set a event handler for document.body.onclick
that handler will check the window.event.srcElement.tagName to see if it's a link. then, it can get the href properties, to see what page it is going to. there are a bunch of properties for the anchor element that can help you.. they can tell you the hostname and page that the href refers to..
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.