I need to track the link used to leave a web page. The script should also send the link url to the server. I'm a JavaScript newbie, could someone point me to the right direction here? (Where to start?)
You can get the 'referrer' (the page the user came from) when entering your page, but I'm not confident there's a way to get the place they went to after they left your page with JavaScript. If you're trying to figure out which page causes the most people to leave your site, consider using Google Analytics. Or CrazyEgg, which has some nifty looking click-heatmaps. Hope this is somewhat helpful.
At least the myBlogLog tracking script can track the leaving link, so I'm pretty confident it can be done. I just have no idea how...
to my knowledge, there is no such kind of stuff, how exactly it works means your tracking script works when ever page loads, say 1,2,3,4,5,... 10 pages if you take max datetime of the visitor per ip or sessionid or any other unique field name then it is your exit page .. select max(date_time),pagename from xxx group by ipaddress thats it