Sign in to follow this  
docbee

Getchartfromid Does Not Work With Ie9?

Recommended Posts

Looks like Browser-specific "if-then-else" code behind "getChartFromId" in FusionCharts.js does not work properly with IE9.

I don't get the expected handle back. It works fine with old IEs, Firefox, etc...

 

Any idea what I should change in the following definition of FusionCharts.js to make it working?

 

infosoftglobal.FusionChartsUtil.getChartObject = function(id)
{
 var chartRef=null;
 if (navigator.appName.indexOf("Microsoft Internet")==-1) {
if (document.embeds && document.embeds[id])
 	chartRef = document.embeds[id]; 
else
chartRef  = window.document[id];
 }
 else {
chartRef = window[id];
 }
 if (!chartRef)
chartRef  = document.getElementById(id);

 return chartRef;
}

Share this post


Link to post
Share on other sites

Doing some more reading on the web it could also be, that the handle returned is fine, but IE9 is not willing to apply the feedData method of the flash object to it.

 

The code that throws the error is:

 

var chartRef = getChartFromId("ChId" + i);
chartRef.feedData(lines[i+1]);

 

Error message is "SCRIPT438: Object doesn't support this property or method"

 

Any ideas how to get that fixed? Handing over data to the flash applet does work fine with the other browsers.

Edited by docbee

Share this post


Link to post
Share on other sites

Sorry, false alarm.

 

FusionCharts is fine with IE9, but the JavaScript I wrote for receiving data via "xmlhttprequest" were stuck by some kind of unexpected caching by IE9.

I did solve that by adding a timestamp to the requesting URL which makes the URL unique and disables caching as a wanted side effect.

Edited by docbee

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this