Jump to content


Getchartfromid Does Not Work With Ie9?


  • Please log in to reply
2 replies to this topic

#1 docbee

docbee

    Junior Member

  • Members
  • PipPip
  • 12 posts

Posted 26 September 2011 - 05:58 PM

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;
}


#2 docbee

docbee

    Junior Member

  • Members
  • PipPip
  • 12 posts

Posted 26 September 2011 - 08:57 PM

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, 26 September 2011 - 09:01 PM.


#3 docbee

docbee

    Junior Member

  • Members
  • PipPip
  • 12 posts

Posted 26 September 2011 - 11:13 PM

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, 26 September 2011 - 11:14 PM.