I have difficulty on integrating my JavaScript syntax. My code is working on Internet Explorer (IE). However, I encountered a JavaScript error when running it on Safari.
As Bhojendra mentioned don't use srcElement. Check for object null or not before accessing id or target property as below.
document.onmouseup = function hideaddrspopup ()
{
if (e && e.target && e.target.id!='fieldName')
{
alert(e.target.id);
}
else if(e && e.srcElement && e.srcElement.id!='fieldName')
{
alert(e.srcElement.id);
}
}
Updated with else if to support older IE browser. target should support it too but you could test without else part if it is necessary or not.