The "target" attribute of the event object passed to your event handler (or, in the case of IE, configured as a global variable) will be a reference to the affected element. If you configure event handlers using Prototype, then:
function clickHandler(ev) { var id = ev.target.id;
source share