Sign in to follow this  
FusionCharts Support

Object doesn't support this property or Method

Recommended Posts

The current technologies used on my server (ASP, JavaScript, ExtJs)

 

FusionCharts (evaluation charts downloaded last week)

 

 

 

I am trying to update the charts dynamically from a drop down field. Once the drop down field has changed it calls a function to update the XML URL. This code works well (0 errors) in Firefox, but fails in IE.

 

 

 

HTML Code

 


div id="errorRateChart" style="width:49%;" /div

script type="text/javascript"

var browser=navigator.appName;

if (browser!='Microsoft Internet Explorer')

{

var myChart = new FusionCharts("fusionCharts/AngularGauge.swf", "errorRateChart", "300", "175", "0", "1");

}else{

var myChart = new FusionCharts("fusionCharts/AngularGauge.swf", "errorRateChart", "300", "175", false, true);

}

myChart.setDataURL("webService/processErrorRateGaugeChart.asp");

myChart.render("errorRateChart");

/script

 

 

 

My Javascript code

 


// Update String							

var strUrl;

strUrl = escape('webService/processErrorRateGaugeChart.asp?dateId=' + myNewDateId + '&scm=' + newScm);			

var chartObj = getChartFromId("errorRateChart"); 

chartObj.setDataURL(strUrl);

 

 

 

While this code works in Firefox quite nicely, it fails wit the following error in IE

 

Error: Object doesn't support this property or method

 

The error is referenced to the following code line:

 

chartObj.setDataURL(strUrl);

 

 

 

I have tried changing the following code from this:

 

var myChart = new FusionCharts("fusionCharts/AngularGauge.swf", "errorRateChart", "300", "175", false, true);

 

to:

 

var myChart = new FusionCharts("fusionCharts/AngularGauge.swf", "errorRateChart", "300", "175", "0", "1");

 

 

 

but the code doesn't even work the first time the chart is called.

 

 

 

I have researched the forums and have found the following topics:

 

http://www.fusioncharts.com/forum/Topic1675-47-2.aspx

 

http://www.fusioncharts.com/forum/Topic699-6-1.aspx

 

http://www.fusioncharts.com/forum/Topic2403-33-1.aspx

 

 

 

I know that in IE my code is not getting registered with javascript. Does anyone have any idea what this might be occurring?

Share this post


Link to post
Share on other sites

Hi,

In JavaScript the would be

var myChart = new FusionCharts("fusionCharts/AngularGauge.swf", "errorRateChart", "300", "175", "0", "1");

 

Please do not use true/false.

The problem might be a conflict between extJS and FusionCharts js API.

May i request you try a hack which might work :

//After this line

myChart.render("errorRateChart");

//Could you please add this once and try again

if(!document.embeds['errorRateChart'] && !window['errorRateChart'])

   window['errorRateChart']=document.getElementById('errorRateChart');

Share this post


Link to post
Share on other sites

Can you provide a link to a detailed explanation of this conflict. I am having problems getting my charts to rerender using the chartObj.setDataURL(theURL); method in IE6.

 

 

 

Trying this hack gets me some better results but then produces undesirable results in IE7. I need to know more about the conflict to come up with a solution that employs this hack in a way that works for both versions of IE.

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