shwetha

Fusion Chart Javascript Error

Recommended Posts

Hi,

 

 

 

I am display a Bar2D chart in ASP.NET application. I am getting the data from database and populating it to the array and further using it in the FusionChart.

 

 

I have included the "FusionChart.js" file in my aspx page. The chart was displaying fine until yesterday but it is giving the following error today.

 

 

"Line: 27

Error: Object doesn't support property or method 'setAttribute'"

 

 

In the debug mode, the error is caused by the following code in FusionChart.js file.

 

if(swf) { this.setAttribute('swf', swf); }

 

 

I have not modified the code since the time it was last working.

 

 

 

The following is my code behind code;

 

 

 

StringBuilderxmlData = new StringBuilder();

 

xmlData.Append("<chartcaption='Posting Trend Report' formatNumberScale='1' rotateValues='1'placeValuesInside='1' >");

 

for (int i = 0; i < names.Count;i++)

 

{

 

xmlData.AppendFormat("<setlabel='{0}' value='{1}'/>", chartData[i, 0], chartData[i, 1]);

 

}

 

xmlData.Append("</chart>");

 

 

literalChart.Text = FusionCharts.RenderChart("../FusionCharts/Bar2D.swf","", xmlData.ToString(), "postingTrends", "800", "1500",false, true);

 

The folowing is my aspx code

 

 

<script src="js/FusionCharts.js"type="text/javascript"></script>

 

 

//rest of code

 

<div>

<asp:Literal ID="literalChart"runat="server"></asp:Literal>

</div>

 

 

 

 

 

 

Any insight on this issue will be helpful.

 

 

Thanks

 

Shwetha

 

 

Edited by shwetha

Share this post


Link to post
Share on other sites
Guest Sumedh

Hi Shwetha,

 

A warm welcome to FusionCharts Forum! smile.gif

 

Could you please check for the Flash Player version and browser version?

 

Mention the flash player and browser version details.

Share this post


Link to post
Share on other sites

Hi Sumedh,

 

 

 

Thank you for replying.

 

I am running the chart on IE 9 and the Flash Player version is 11.5.502.110

 

 

 

 

Best Regards

 

Shwetha

Share this post


Link to post
Share on other sites

Hi Shwetha,

 

Thanks for the inputs.

 

Error "Object doesn’t support property or method", it may be caused by several reasons in Internet Explorer browser.

 

Can you please try once reset the IE settings?

 

Steps to follow:

1) In Internet Explorer, select the Tools menu and then click Internet Options. 2) Click the Advanced tab, Click Reset button.

 

3) Click Reset button while a prompt asks” Are you sure you want to reset all the Internet Explorer settings”.

 

4) Click Ok, restart your IE.

 

5) Please re check if the issue still exists.

 

Hope this helps.

 

 

 

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