Sign in to follow this  
abhidev

Error in Fusioncharts.js

Recommended Posts

Hi...

 

 

 

Now i ma caught up with this error

 

 

 

Webpage error details

 

 

 

User Agent: Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 5.1; Trident/4.0; .NET CLR 2.0.50727; .NET CLR 3.0.4506.2152; .NET CLR 3.5.30729)

 

Timestamp: Thu, 6 May 2010 07:14:59 UTC

 

 

 

 

 

Message: 'null' is null or not an object

 

Line: 188

 

Char: 4

 

Code: 0

 

URI: http://localhost:8080/javascript/thirdparty/FusionCharts.js

 

 

 

And the line 188 is

 

else{

 

//Render the chart

 

var n = (typeof elementId == 'string') ? document.getElementById(elementId) : elementId;

 

n.innerHTML = this.getSWFHTML();

 

 

 

//Added

compatibility

 

//Check if it's added in Mozilla embed array or if already exits

 

if(!document.embeds[this.getAttribute('id')] && !window[this.getAttribute('id')])

 

window[this.getAttribute('id')]=document.getElementById(this.getAttribute('id'));

 

//or else document.forms[formName/formIndex][chartId]

 

return true;

 

}

 

 

 

 

 

Any solutions for this please. I have moved all the render chart code on the page to a $(document).ready block. This made the charts to be visible in IE8. Previously no charts were rendered. Please help. Thanx in advance

Share this post


Link to post
Share on other sites
Guest Basundhara Ghosal

Hi Abhi,

Please try specifying unique IDs for the chart(chartId) and the Div where you are rendering the chart.

Also, the variable name that you are using to declare the 'ChartId' should also be unique.

Ref.-

<div id="chart1div">

  FusionCharts

 </div>

<script language="JavaScript">

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

chart1.setDataXML("<chart><set label='A' value='10' /><set label='B' value='11' /></chart>");

chart1.render("chart1div");

 </script>

I 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
Sign in to follow this