is it possible to have default behavior and .onclick event-binking on a link?
I have the code for social-media sharing buttons (for example <a href="https://www.facebook.com/sharer/sharer.php?u=<?php echo $URL; ?>">FB icon </a> )
but I want to also get an email when a user hits a share button (my site will be low-traffic… so I can do stuff like this…) is it possible to do this? if not, what other way is there to do this? thank you…
This will of course delay the actual redirect a bit, which might not be that great a UX. So if you’re not interested in the response, you might perform the redirect just after the first readystatechange event or something, just to make sure the XHR got really sent.