I am using
function addEvent(element,myEvent,fnc)
{return((element.attachEvent)?element.attachEvent('on'+myEvent,fnc):element.addEventListener(myEvent,fnc,false));}
as detailed at addEventListener vs onclick .
Now to attach a click
event to the window
element I am using
addEvent(window,'click',myfunc);
where myfunc
is a callback function. The problem is that IE 8 is not attaching the click event using this function how can I modify this function for IE 8 ? Thanks