Sign in to follow this  
Centyz

"Object doesn't support this property or method" while trying to use setDataUrl in IE6

Recommended Posts

This is how i call it

 

chart.setDataURL(graphUrl);

 

 

 

The chart-object is fetched with the getChartFromId-function, and the object is found properly. This works fine in FireFox 2.0, and internet Explorer 7.0, but in internet Explorer 6.0 i get "Object doesn't support this property or method".

 

 

 

Is this a known bug?

 

 

 

[edit] It's the second time calling that fails, the init-call works like a charm. I'm trying to load another graph with the setDataUrl-method.

Edited by Guest

Share this post


Link to post
Share on other sites

If you're getting an error that setDataURL/setDataXML is not a function of the chart object, please make sure of the following:

1. Please make sure that you're using FusionCharts v3 charts, as the JavaScript API was introduced in this version. To check whether you're using v3, just match your SWF name with the names listed at http://www.fusioncharts.com/Docs/Contents/ChartList.html

2. Please ensure that you've set registerWithJS flag to 1. For more information on how to do this, please see http://www.fusioncharts.com/Docs/Contents/JS_Overview.html. Basically, you need to set the last parameter in the following code to 1:

var chart1 = new FusionCharts("FusionCharts/Column3D.swf", "chart1Id", "400", "300", "0", "1");

3. Please make sure that you're not placing the chart inside a FORM element. When the chart is inside a FORM element, the browser cannot access the chart using DOM.

4. Please make sure that you're not calling the setDataURL/setDataXML method before the chart has loaded and rendered. You need to use FC_Rendered function of chart to track the loading of chart as explained at http://www.fusioncharts.com/Docs/Contents/JS_Overview.html. The page's body onLoad event would NOT work, as the chart starts loading after the body has finished loading.

5. Please make sure that you're NOT running the chart from local file system (C: , D:). Instead, run the chart from behind a server (localhost - IIS, Apache etc.). This is because the Flash Player security settings do not allow Chart to JavaScript interaction, unless otherwise specifically set.

Share this post


Link to post
Share on other sites

Number 4 helped. The graph is not loaded and rendered in IE6, but works in firefox2.0. So the problem is earlier in the process, in fact in the init of the graph. I noticed that the innerHTML returned from getSWFHTML() has a OBJECT-tag where the attribute-values are not surrounded with quotation-marks. Could this cause problems? I'm uncertain how the colon works for unquoted attribute-values in the classid attribute.

Edited by Guest

Share this post


Link to post
Share on other sites

Hi,

  my chart is working in Firefox ,IE 7,opera its not working only on IE 6 here with i have attached the source code

  " <Cache-Control: cache, must-revalidate Pragma: public OBJECT classid="clsid:D27CDB6E-AE6D-11cf-96B8- 444553540000"" +"codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,0,0"" +

  " WIDTH="400" HEIGHT="300" id="opportunityBySalesStage" ALIGN="">" +

  " <PARAM NAME=movie VALUE="../charts/StackedBar3D.swf">" +

  " <PARAM NAME="FlashVars" VALUE="&chartWidth=100&chartHeight=100&dataXML=" +

  pipeLineChart + "">" + " <PARAM NAME=quality VALUE=high>" +

  " <PARAM NAME=bgcolor VALUE=#FFFFFF>" +

  " <EMBED src="../charts/StackedBar3D.swf" FlashVars="&chartWidth=100&chartHeight=100&dataXML=" +

  pipeLineChart +

  "" quality=high bgcolor=#FFFFFF WIDTH="400" HEIGHT="300" NAME="opportunityBySalesStage" ALIGN="" TYPE="application/x-shockwave-flash"" +

  " PLUGINSPAGE="http://www.macromedia.com/go/getflashplayer"></EMBED>" +

  " </OBJECT>";

 

 

please help me in this regards.

Share this post


Link to post
Share on other sites

There is also an answer on the following site:

http://capitalhead.com/articles/object-doesnt-support-this-property-or-method.aspx

kristian (3/29/2007)
This is how i call it

chart.setDataURL(graphUrl);

 

The chart-object is fetched with the getChartFromId-function, and the object is found properly. This works fine in FireFox 2.0, and internet Explorer 7.0, but in internet Explorer 6.0 i get "Object doesn't support this property or method".

 

Is this a known bug?

 

[edit] It's the second time calling that fails, the init-call works like a charm. I'm trying to load another graph with the setDataUrl-method.

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