Hello everyone,
I have a little problem with Javascript Link, when I click on a chart.
I just copied the sourcecode-exemple from the website:
<html>
<head>
<title>JavaScript Link Example</title>
<script language="JavaScript" src="Javascript/Charts/FusionCharts.js"></script>
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.4.3/jquery.min.js"></script>
<SCRIPT LANGUAGE="JavaScript"><!--
function myJS(myVar){
$("#test").append("<br>" +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("Javascript/Charts/Column2D.swf",
"myChartId", "500", "300", "1",
"1");
myChart.setXMLUrl("Data_Chart.xml");
myChart.render("chartdiv");
// --></script>
<div id="test" style="margin-left: 0px;">
</div>
</body>
</html>
my XML-Data:
<chart caption='ABC Bank Branches' subCaption='(In
Asian Countries)' yaxislabel='Branches' xaxislabel='Country' unescapeLinks='0'>
<set label='Hong Kong' value='235' link="JavaScript:myJS('Hong Kong,235');"/>
<set label='Japan' value='123' link="JavaScript:myJS('Japan, 123');"/>
<set label='Singapore' value='129' link="JavaScript:myJS('Singapore, 129');"/>
<set label='Malaysia' value='121' link="JavaScript:myJS('Malaysia, 121');"/>
<set label='Taiwan' value='110' link="JavaScript:myJS('Taiwan, 110');"/>
<set label='China' value='90' link="JavaScript:myJS('China, 90');"/>
<set label='S. Korea' value='86' link="JavaScript:myJS('S.Korea, 86');"/>
</chart>
when I click on the chart nothing happens.
Does somebody has an Idea?
Thanks for help
Max95