I have a simple piece of PHP which generates n copies of the following code:
Here is a cross-browser way to find the element (target) that triggered the event (e):
function getTarget(e){ // non-ie or ie? e=e||window.event; return (e.target||e.srcElement); };