If you register a click listener something like this: <script type="text/javascript"> Event.observe(document.body, 'click', function(event) { if( the url that was clicked == xxx){ alert('hi'); } }); </script> Code (markup): how do you get the destination URL of the link that was clicked, assuming it was a link.
Hi i'm not familiar to the framework you are using (I guess it's the Prototype) from what I can figure out from their documentation you need to do something like this: <script type="text/javascript"> Event.observe(document.body, 'click', function(event) { if( event.findElement().href == 'xxx'){ alert('hi'); } }); </script> event.findElement() should return the element you clicked on, and href should contain the link hope it helps John