I am using jqplot and for the life of me I can’t get it to work on IE8 or IE7. Nevermind I would be happy for it to just work on IE9, Firefox Etc, but I need a message to be displayed if the chart is not successful.
I tried placing a message in the div tags of the chart div, but the problem is that the contents of the div remain even if the chart is rendered.
So is there a way to handle an event of the chart successfully being displayed on which I can write code to hide the message asking them to upgrade their browser?
I know it is late and everything but I do not like unanswered questions 🙂
To solve this one I would use a simply wrap of
try catcharound the plot painting method.This I am presenting in the following jsfiddle.
Tested on IE7, IE8 and IE9 and only for 9 it does not display an alert suggesting a browser update.
The second option that I could think of is to have a div displaying the update suggestion at start then if the plot is created successfully use the
postDrawHooksto remove the div. The method use sample: