Hello,
I am attempting to get a handle on FusionCharts v3 using a product called Websmart accessing an AS/400 database. I have crated a simple page using three graphs being populated by external XML calls. All is working great and I am now trying to establish a simple drill down function. Page is populated by a location number being passed via URL - right now I am simply attempting to change MTD graph to a different location by clicking ANY YTD graph bar. The location change is hardcoded until I establish function - I can then setup all necessary parameters to control graphs. I have very little Javascript experience but have tried a number of methods that I have deciphered from blueprint - but when obvious errors removed seems to come back to - Object doesn't support this property or method. I am just not getting it right! Can anybody there take a look a code and point out obvious problems. I can provide URL but would rather not publish to public.
Basic code - internal address
<html>
<head>
<script language="JavaScript" src="FusionCharts.js"></script>
<Script LANGUAGE="JavaScript">
function UpdateMTDChart(Year)
{
MTDChart.setDataURL("http://192.168.0.2/scs400web/xml002.pgm?Location=27");
}
</Script>
</head>
<body bgcolor="#ffffff">
<BR>
<div id="YTDChartDiv" align="center">The chart will appear within this DIV. This text will be replaced by the chart.</div>
<script type="text/javascript">
var YTDChart = new FusionCharts("Column3D.swf","YTDChartId","900","300","0","0");
YTDChart.setDataURL("http://192.168.0.2/scs400web/xml001.pgm?Location=000321");
YTDChart.render("YTDChartDiv");
</script>
<BR>
<div id="MTDChartDiv" align="center">The chart will appear within this DIV. This text will be replaced by the chart.</div>
<script type="text/javascript">
var MTDChart = new FusionCharts("Column3D.swf","MTDChartId","900","300","0","0");
MTDChart.setDataURL("http://192.168.0.2/scs400web/xml002.pgm?Location=000321");
MTDChart.render("MTDChartDiv");
</script>
<BR>
<div id="DLYChartDiv" align="center">The chart will appear within this DIV. This text will be replaced by the chart.</div>
<script type="text/javascript">
var DLYChart = new FusionCharts("Column3D.swf","DLYChartId","900","300","0","0");
DLYChart.setDataURL("http://192.168.0.2/scs400web/xml004.pgm?Location=000321");
DLYChart.render("DLYChartDiv");
</script>
<BR>
</body>
</html>
Thanks for your help!