Closed Thread Icon

Topic awaiting preservation: Get destination URL? (Page 1 of 1) Pages that link to <a href="https://ozoneasylum.com/backlink?for=8765" title="Pages that link to Topic awaiting preservation: Get destination URL? (Page 1 of 1)" rel="nofollow" >Topic awaiting preservation: Get destination URL? <span class="small">(Page 1 of 1)</span>\

 
rickindy
Nervous Wreck (II) Inmate

From: Indianapolis, In USA
Insane since: Jan 2002

posted posted 07-21-2003 16:40

What I would like is to have an onUnload() function that would be able to determine where the user is going. This way, I would be able to find out whether the visitor is satying on my site or going somewhere else.
Is this possible, or do I have to put an onClick() handler in every link on the page?

Thanks.


Few problems in life can't be solved by chocolate

amikael
Bipolar (III) Inmate

From: övik
Insane since: Dec 2002

posted posted 07-21-2003 16:47

<script>
document.onmousedown=function test() {
if(event.srcElement.tagName=="A") {
adress=event.srcElement.getAttribute("href");
doSomething(adress);
}
}
</script>

It's crude, but you get the idea.
You can probably do this crossbrowser too, and you should check parentElements in case the user clicked something nested within a link.


(^-^)b

« BackwardsOnwards »

Show Forum Drop Down Menu