Is there a way to make an Ajax request for my Twitter button (https://dev.twitter.com/docs/tweet-button) before it redirects to Twitter? I want to perform some JavaScript actions before opening the Twitter login popup like this:
window.addEvent('domready', function () {
$('twitterbut').setProperties({
onclick: "//do ajax call;return (true);"
});
});
I attempted this approach but it isn't working. How can I successfully add an onclick event similar to the one mentioned above?