Guest Basundhara Ghosal

Null

Recommended Posts

Hello,

I am trying to use for the first time fusion chart, but getting this error:

Message : 'null' has null value or is not an object

Line : 250

Character : 5

Code : 0

URI : http://intranet/FusionCharts/JSClass/FusionCharts.js

here is my code:

<link rel="stylesheet" href="FusionCharts/Contents/Style.css" type="text/css" />
<script language="JavaScript" src="FusionCharts/JSClass/FusionCharts.js"></script>    
    
</head>
<body>
      <script language="JavaScript" type="text/JavaScript">
<!--
function showdiv(Did){
//alert(Did);
var maDiv = document.getElementById(Did)
  
if(maDiv.style.display == 'none'){
maDiv.style.display = 'block';	
}
else{
maDiv.style.display = 'none';
}
}
//-->
</script>
 <link rel="stylesheet" href="modules/Actionplan/stylesheets/default.css" type="text/css" />
 <div id="columns">
    
    <ul id="column1" class="column">
	    <li class="widget color-green">
		    <div class="widget-head">
			    <h3>Introduction </h3> 
		    </div>
		    <div class="widget-content">
			    <p>'._WidgetIntro.' <script type="text/javascript">
 var chart = new FusionCharts("FusionCharts/Charts/Column2D.swf", "ChartId", "500", "300", "0", "0");
 chart.setDataURL("FusionCharts/Gallery/Data/Column2D.xml");	 
 chart.render("chartdiv");
 </script></p>
		    </div>

Any idea?

Edited by Guest

Share this post


Link to post
Share on other sites
Guest Basundhara Ghosal

Hi,

You need to write this code chart.render("chartdiv") inside your HTML codes and the chartdiv(which is a 'div id') should not enclose any script.

For example:

<div id="chartdiv" align="center"> 

  FusionCharts. </div>

Hope this helps. :)

Share this post


Link to post
Share on other sites

same error with this:

<code>

echo' <script type="text/javascript">

var chart = new FusionCharts("FusionCharts/Charts/Column2D.swf", "ChartId", "500", "300", "0", "0");

chart.setDataURL("FusionCharts/Gallery/Data/Column2D.xml");

chart.render("chartdiv")

</script>

  <div id="Help" style="display:none"><img src="modules/actionplan/pnimages/AidePA-fra.png"></help></div>

  <div id="mygantt" style="display:none"> <IMG SRC="modules/actionplan/mygantt.php?uid='.$userid.'&site='.$site.'〈='.$lang.'"></div>

 <div id="columns">

 

  <ul id="column1" class="column">

  <li class="widget color-green">

  <div class="widget-head">

  <h3>Introduction </h3>

  </div>

  <div class="widget-content">

  <p>'._WidgetIntro.' <div id="chartdiv" align="center"></div></p>

  </div>

</code>

Share this post


Link to post
Share on other sites
Guest Basundhara Ghosal

Hi,

Could you please have a look to the following link as it contains the solution for similar kind of issue?

Ref:-http://www.fusioncharts.com/forum/Topic19306-28-1.aspx

Hope this helps. :)

Share this post


Link to post
Share on other sites
Guest Basundhara Ghosal

Hi,

We apologize for the inconvenience caused.

Could you please send us the XML code that you are using as an attachment so that we might look into it?

Awaiting your reply. :hehe:

Share this post


Link to post
Share on other sites

Hi,

To start with your issue:

Hello,

I am trying to use for the first time fusion chart, but getting this error:

Message : 'null' has null value or is not an object

Line : 250

Character : 5

Code : 0

URI : http://intranet/FusionCharts/JSClass/FusionCharts.js

 

here is my code:

<link rel="stylesheet" href="FusionCharts/Contents/Style.css" type="text/css" />

<script language="JavaScript" src="FusionCharts/JSClass/FusionCharts.js"></script>  

 

</head>

<body>

 <script language="JavaScript" type="text/JavaScript">

<!--

function showdiv(Did){

//alert(Did);

var maDiv = document.getElementById(Did)

 

if(maDiv.style.display == 'none'){

maDiv.style.display = 'block';

}

else{

maDiv.style.display = 'none';

}

}

//-->

</script>

 <link rel="stylesheet" href="modules/Actionplan/stylesheets/default.css" type="text/css" />

 <div id="columns">

 

  <ul id="column1" class="column">

  <li class="widget color-green">

  <div class="widget-head">

  <h3>Introduction </h3>

  </div>

  <div class="widget-content">

  <p>'._WidgetIntro.' <script type="text/javascript">

var chart = new FusionCharts("FusionCharts/Charts/Column2D.swf", "ChartId", "500", "300", "0", "0");

chart.setDataURL("FusionCharts/Gallery/Data/Column2D.xml");

chart.render("chartdiv");

</script></p>

  </div>

It seems that you have NOT defined any of the DIVs with ID value "chartdiv". Could you please confirm that you have a DIV with with "chartdiv"?
The line :chart.render("chartdiv"); says that the chart will be rendered in a DIV having id - "chartudiv". But it seems that there is no such div. 
So, the renedering engine is unable to locate the DIV and hence unlocated refence is rseulted as 'null'.
Please define a DIV with id="chartdiv". 

 

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