I would like an event handler to fire whenever someone clicks anywhere on a window (so I can clear away a menu if they click someplace other than the menu). The following works in Safari:
function checkwho(ev) {
obj=(window.external) ? event.srcElement : ev.target;
var type=obj.nodeName;
if ((type == 'BODY') || (type == 'HTML') || (type == 'DIV')) clearmenus();
}
self.onclick=checkwho;
But it does not work in Firefox or Internet Explorer 6, i.e. the handler does not get invoked. How to make this work in Firefox and Internet Explorer?