1

I have a page with multiple divs with highcharts in them. I don't know if this happens on all ie9s or just this machine. When you go to the page on this laptop's ie9, nothing is displayed, blank page. If you refresh the page, refresh again, and again, nope, nothing, still a blank page. Then hit f12 to see what's going on, and hit f5 and all the charts become visible. I don't think I can do anything about it except to tell the client to update their IE but has anyone ever seen this sort of thing?

EDITT: I'm getting charts data with ajax if that makes a difference.

artm
  • 8,554
  • 3
  • 26
  • 43
  • 3
    `Console` not existing until the dev tools are open? (http://stackoverflow.com/questions/10183440/console-is-undefined-error-in-ie9) – Alex K. Sep 26 '14 at 15:08
  • @AlexK. Had no idea! I'll try that. I have a couple of console.logs indeed. Thanks. My guess is I'll be asking you to change this comment into an answer monday arvo so I can accept it :) – artm Sep 26 '14 at 15:15
  • Any chanse to supply us your chart which doesnt work? Demos from [highcharts.com](http://www.highcharts.com) also doenst work? – Sebastian Bochan Sep 29 '14 at 10:45

1 Answers1

2

Use this code

<script type="text/javascript">
// IE9 fix
if(!window.console) {
    var console = {
        log : function(){},
        warn : function(){},
        error : function(){},
        time : function(){},
        timeEnd : function(){}
    }
}

Put this in your HTML. This will work for you.

vamsi
  • 1,488
  • 3
  • 28
  • 66