just found out works on ie and ff and chrome. others don't know, but I expect this to work for everyone else. at least I hope so :) As a newbie to html, JS and PHP, it is very annoying that there is no standard in these things! even styling a simple div element can be a heading because the behavior is not always the same in different browsers !?
function somefunc()
{
var callerelement = arguments.callee.caller.arguments[0].target;
alert(callerelement.id)
}
source
share