AJAX status update to application just before a external site's button/link sends the user to another site ???


I’m incorporating a Palpal donate button on my site, however I’d like to be able to send an update (AJAX) to my application to alert it to the fact that the user has clicked on donate, and hence would be in the process of being taken to the PayPal site.

Is there a way to wrap an AJAX update back to my application around an external site’s link that I embed.


Take a look at how any popular web analytics package handles the
tracking of outclicks. For example:

    http://s10.sitemeter.com/js/counter.asp (Note: Copyright)

Basically, you add an onclick event handler to every link in the
document by iterating over document.links.


thanks Sheldon - you don’t happen to know whether prototype or scriptaculus have this type of feature inbuilt somewhere?

Well they both support iterating over document elements (although
iterating over document.links is easy enough), and from there I'd
imagine it's just the usual remote post handling.