I just found and started using Fusion Charts, so far I'm really liking what it can do. I'm new to this so please bare with me.
I do have a problem though. I can't seem to be able to use different onclick functions on the page that I've created.
The page has multiple links and when you click on one of them two separate SWF's open and show the appropriate data. This is working fine but I can't seem to be able to click on any of the other links to display there SWF"s. If I refresh the page and then click on the link it works for that one.
I've create two seperate XML files that it uses (ex: adus10_pie.xml and adus10_chart.xml)
Any help would be greatly appreciated. I will include what I have so far.
<html>
<head>
<script language="JavaScript" src="/fusioncharts/fusioncharts/FusionCharts.js"></script>
<title>testing</title>
<style type="text/css">
<!--
.style2 {color: #FFFFFF; font-size: 18px; }
.style4 {color: #000000}
.style5 {color: #FFFFFF}
-->
</style>
<script>
function showgraphs (servers){
mypie.setDataURL(servers+"_pie.xml");
mypie.render("piediv");
mychart.setDataURL(servers+"_chart.xml");
mychart.render("chartdiv");
}
</script>
</head>
<body>
<div align="center">
<table width="100%" height="75%" border="3" cellpadding="2" cellspacing="1">
<tr>
<td width="15%" bgcolor="#7AC142"><p align="center"> </p>
<p align="center"> </p>
<p align="center" class="style2"><a href="#" onclick="showgraphs('adus10');">adus10</a> </p>
<p align="center" class="style2"><a href="#" onclick="showgraphs('adcan6');">adcan6</a> </p>
<p align="center" class="style2"><a href="#" onclick="showgraphs('impact2');">impact2</a> </p>
<td width="15%" bgcolor="#7AC142"><p align="center" class="style4">Click on any link to view the disk usage and the size of the home directories </p>
<p align="center" class="style2"><a href="#" onclick="showgraphs('lgbhalo2');">lgbhalo2</a> </p>
<p align="center" class="style2"><a href="#" onclick="showgraphs('adesa');">adesa</a> </p>
<p align="center" class="style2"><a href="#" onclick="showgraphs('adcan4');">adcan4</a> </p>
<p align="center" class="style2"><a href="#" onclick="showgraphs('halo1');">halo1</a> </p>
<p align="center" class="style2"><a href="#" onclick="showgraphs('halo2');">halo2</a> </p>
<p align="center" class="style2"><a href="#" onclick="showgraphs('halo1');">halo1</a> </p>
</td>
</div>
<td width="67%" bgcolor="#CCCCCC"><div align="center">
<div id=piediv> </div>
<script type="text/javascript">
var mypie = new FusionCharts("/fusioncharts/fusioncharts/FCF_Pie3D.swf", "pieId", "400", "400");
mypie.setDataURL(servers+"_pie.xml");
mypie.render("piediv");
</script>
</div>
</td>
</tr>
</table>
<table width="100%" height="80%" border="3" cellpadding="2" cellspacing="1">
<tr>
<td height="60%" bgcolor="#32AFE1"><div align="center">
<div id=chartdiv> </div>
<script type="text/javascript">
var mychart = new FusionCharts("/fusioncharts/fusioncharts/FCF_Column3D.swf", "chartId", "1400", "550");
mychart.setDataURL(servers+"_chart.xml");
mychart.render("chartdiv");
</script>
</div>
</td>
</tr>
</table>
</div>
</body>
</html>

Back to top
MultiQuote