Posted 19 July 2010 - 04:34 AM
Hi,
This seems to be a case-sensitive issue..so far I can see..
This is your code:
<div id="chart<%=mDivCount%>div" align="center">
You do not have Adobe Flash installed and therefore will not be able to see the Gauge.
</div>
<script type="text/javascript">
var myChart<= new FusionCharts("../FGv3/HLinearGauge.swf", "myChart<%=mDivCount%>Id", "400", "80", "0", "0");
myChart<setDataURL("./Data_List_DSMr_Growth.asp?DSM=<<%=trim(rsDSM.Fields.Item("SalesTerritory").Value)%>&Prov=<%=trim(rsDSM.Fields.Item("Province").Value)%>");
myChart<render("Chart<%=mDivCount%>div");
</script>
Say for instance if mDivCount iterates through Please note the line:
<div id="chart<%=mDivCount%>div" align="center">
It says that there would be divs with ids chart1div,chart2div,chart3div,chart4div,chart5div...
Please note the small letter c in all chartxdiv.
Now when you are calling render() function
myChart<render("Chart<%=mDivCount%>div");
please note that you are asking to render to the target div having name Chart1div,Chart2div,Chart3div,Chart4div,Chart5div...
NOTE the C in capital in this case.
Internally the renderer function will try search for a Div with id "Chart1div" which the browser would fail to provide as it only has "chart1div" (note the capital C and lower case c)...
hence you are sure to get a 'null' object...(object not found = null object) and you can not set innerHTML to a null DOM Object.
Hence, the error.
Could you please try once setting the code to this...very small change invisible to human eye...
<div id="chart<%=mDivCount%>div" align="center">
You do not have Adobe Flash installed and therefore will not be able to see the Gauge.
</div>
<script type="text/javascript">
var myChart<= new FusionCharts("../FGv3/HLinearGauge.swf", "myChart<%=mDivCount%>Id", "400", "80", "0", "0");
myChart<setDataURL("./Data_List_DSMr_Growth.asp?DSM=<<%=trim(rsDSM.Fields.Item("SalesTerritory").Value)%>&Prov=<%=trim(rsDSM.Fields.Item("Province").Value)%>");
myChart<render("chart<%=mDivCount%>div");
</script>