JavaScript Resize not firing on IE?

EDIT : THe problem is that the site is sooo bad, and he is still in document.readyState = "interactive" so I don't have resize events :'(

I'm working on a website (that I didn't made). I'm trying to integrate a banner properly. I face a problem with IE 10/9. The even resize is not working.

this is the code i use

function addEvent(elementDOM, evenement, fonction){
    var refEvent = null;
    if(elementDOM)
    {
        if (elementDOM.addEventListener)
        {
            refEvent = fonction;
            elementDOM.addEventListener (evenement,refEvent,false);
        }
        else if (elementDOM.attachEvent)
        {
            refEvent =function() {
                return fonction.call(elementDOM,window.event);
            };
            elementDOM.attachEvent ('on'+evenement,refEvent);
        }
        else
        {
            elementDOM["on"+evenement] = fonction;
        }
    }
    return refEvent;
}

I call it like that :

addEvent(window,"resize",function(){
        console.log("a");
    });

And this doesn't works on IE 10 and 9 (it works on FF and Chrome) I enter in the AddEventListener if, but no events are fired. I never see my console log ("a")

the website is this one

http://www.courrierinternational.com/

Can someone help me cause I'm stuck... I really don't know what could be the problem.

Thx :3

Answer:1

I've written this code to create simple CSS and Javascript dropdown menu. HTML: <li><a href="#" onmouseover="showRanksSubmenu()" onmouseout="hideRanksSubmenu()">XYZ</a> <ul ...

I've written this code to create simple CSS and Javascript dropdown menu. HTML: <li><a href="#" onmouseover="showRanksSubmenu()" onmouseout="hideRanksSubmenu()">XYZ</a> <ul ...

  1. pure drop down menu css
  2. pure css drop down menu on click
  3. pure css drop down menu responsive
  4. dropdown pure css
  5. pure css drop down menu with arrow
  6. pure css drop down menu codepen
  7. pure css drop down menu transition
  8. pure css navigation drop down
  9. pure css hamburger dropdown menu
  10. pure css onclick dropdown menu
  11. pure css mega dropdown menu
  12. simple pure css drop down menu
  13. simple pure css drop down menu responsive

I have been developing github unofficial card. So that, I designed a simple card for this and create little script for toggling language stats and general stats. After that I realised one problem ...

I have been developing github unofficial card. So that, I designed a simple card for this and create little script for toggling language stats and general stats. After that I realised one problem ...

Get previous location path on back button click event using by angular.js What I want? I want to go previous page when i click the back button in my current page. HTML <input type="button" ...

Get previous location path on back button click event using by angular.js What I want? I want to go previous page when i click the back button in my current page. HTML <input type="button" ...

I am trying to send a json to a php script on a server and even though I have included header in php script to have CORS the console throws error error message XMLHttpRequest cannot load http://...

I am trying to send a json to a php script on a server and even though I have included header in php script to have CORS the console throws error error message XMLHttpRequest cannot load http://...

  1. cors not working with https
  2. cors not working with localhost
  3. cors not working with postman
  4. cors not working with windows authentication
  5. cors not working with spring security