ashish_kushwaha Report post Posted September 7, 2007 (edited) Hi, I am facing problem, I used "Using JavaScript functions as links " example given in http://www.fusioncharts.com/Docs/Index.html but it is not working . Error is also not showing, below line doesn't work. <code> <set label='javascript' value='764' link="myJS('Hong Kong, 235');" /> // this line present in myData.xml </code> I am attatching my both files with them. please help me. drildown.html <code> <html> <head> <script language="JavaScript" src="../FusionCharts/FusionCharts.js"> </script> <SCRIPT LANGUAGE="JavaScript"> function myJS(myVar) { window.alert(myVar); } </SCRIPT> </head> <body bgcolor="#ffffff" > <div id="chartdiv" align="center">The chart will appear within this DIV. This text will be replaced by the chart.</div> <script type="text/javascript"> var myChart = new FusionCharts("../FusionCharts/Column3D.swf", "myChartId", "900", "300", "0", "0"); myChart.setDataURL("myData.xml"); myChart.render("chartdiv"); </script> </body> </html> </code> myData.xml <code< <chart caption='CAPGENT Technologies Pvt Ltd.' subcaption='Employee Id and their commission for year 2006' xAxisName='Name of Capgent Employee' yAxisName='Employee Id' numberPrefix='Rs.'> <set label='ashish' value='701' link='Chart.html' /> // this line is working fine with this code <set label='javascript' value='764' link="myJS('Hong Kong, 235');" /> // this line is not working <set label='capgent' value='765' /> <set label='aditya' value='766' /> <set label='shivam' value='801' /> </chart> </code> Please help me out. Edited September 7, 2007 by Guest Share this post Link to post Share on other sites
Pallav Report post Posted September 10, 2007 Make sure you're not running from local file system. Share this post Link to post Share on other sites
FusionCharts Support Report post Posted September 11, 2007 (edited) please use "Ja vaScript" prefix in the link. Hence your link definition is to modify this way ... [set label='..' value='...' link="J avaScript:myJS('text,vlaue');"/] Edited September 12, 2007 by Guest Share this post Link to post Share on other sites
ashish_kushwaha Report post Posted September 12, 2007 Hi Pallav, Thanks for giving me solution. I was running on the local file system. Now my problem is solved and chart is running well. Thanks Share this post Link to post Share on other sites
ashish_kushwaha Report post Posted September 12, 2007 (edited) Hi Sudipto, Thanks for reply Edited September 12, 2007 by Guest Share this post Link to post Share on other sites