Angel_marry

How To Set Javascript Function To Xml Link

Recommended Posts

hi,here is a problem need your help!

1. when I run the following code in chrome or IE,appear the problem reference the attachments picture;

2. or you have another way to capture the click event on the histogram

 

Looking forward to your help...

 

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">

<html>

<head>

<meta http-equiv="Content-Type" content="text/html; charset=utf-8">

<title>Capture the Click event</title>

<script language="javascript" src="FusionCharts/FusionCharts.js"></script>

<script type="text/javascript">

function myJS(){

alert("hello World");

}

</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/FCF_Column3D.swf","mychartID","600","500");

myChart.setDataXML('<graph caption="sale bar for each month" xAxisName="Answer Options" yAxisName="Test Result" showNames="1" decimalPrecision="0" formatNumberScale="0"><set name="A" value="12" color="AFD8F8" link="JavaScript:alert(1);"/><set name="B" value="13" color="F6BD0F"/><set name="C" value="6" color="8BBA00"/><set name="D" value="20" color="FF8E46"/></graph>');

myChart.render("chartdiv");

</script>

</body>

</html>

Share this post


Link to post
Share on other sites
Guest Sumedh

Hi,

 

Could you please modify by following in the XML? and try?

 

<set name="A" value="12" color="AFD8F8" link="JavaScript:myJS();" instead <set name="A" value="12" color="AFD8F8" link="JavaScript:alert(1);"

Share this post


Link to post
Share on other sites

Thanks for your attention!

It has the same question : "Adobe Flash Player has stoped an insecure operation."

 

<br />Hi,<br /><br />Could you please modify by following in the XML? and try?<br /><br /><set name="A" value="12" color="AFD8F8" link="<b>JavaScript:myJS();</b>"  instead <set name="A" value="12" color="AFD8F8" link="<b>JavaScript:alert(1);</b>"<br />
<br /><br /><br />

Share this post


Link to post
Share on other sites

Hey,:D

 

Due to Flash Player security implementation, links from charts will not work if you run the chart from local file system. To make the links work, as well make all the chart API's work, you will need to configure Flash Player Global Security Settings.

 

To configure Flash Player Global Security Settings (to enable links and chart APIs) and enable JavaScript calls from charts, you will need to add the folder containing the chart SWF files to Flash Player's Trusted Zone. Please refer to How to Setup Flash Player Global Security Settings page for a detailed step-by-step guide.

 

Hope this helps.

Share this post


Link to post
Share on other sites

Thanks,I am trying...

Hey,:D

 

Due to Flash Player security implementation, links from charts will not work if you run the chart from local file system. To make the links work, as well make all the chart API's work, you will need to configure Flash Player Global Security Settings.

 

To configure Flash Player Global Security Settings (to enable links and chart APIs) and enable JavaScript calls from charts, you will need to add the folder containing the chart SWF files to Flash Player's Trusted Zone. Please refer to How to Setup Flash Player Global Security Settings page for a detailed step-by-step guide.

 

Hope this helps.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now