Using javascript and HTML (some flash too). I want to be able to read where the user is going before the user leaves my page. I have flash content which has links as well as static HTML anchor tags and DHTML onclick and onchange events. I do _not_ have access to change all of the code to use a single wrapper function for redirection.
I am trying to get the new url (href of an anchor tag, location of onclick, etc), using javascript, before my page unloads.
Basically I want a document.nextLocation or document.location.newHref.
But such doesn't exist.
I have looked through the JavaScript reference from Mozilla and read through ECMA-262 and W3C DOM Level 1. No luck. I have Googled most of the morning using searches like "javascript new url" "capture href javascript" "read new url page unload" and many, many more. Still no luck.
Any ideas?
Start Free Trial