
ashish_kushwaha
-
Content count
5 -
Joined
-
Last visited
Posts posted by ashish_kushwaha
-
-
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
-
Hi Pallavi,
I am facing the same problem. Can U please tell me what setting U did to run Javascript function example.
-
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.
-
Hi,
I used the following code and I want to capture the mouse down() or click() event on fusion chart.
When I using this
document.onmousemove=getMousepoints;// ----------this is working
document.onmousedown=getMousepoints;// ----------- this is working
then I am able to capture mouseDown() event on whole screen except on fusionCharts.
If I am using this:
document.Column3D.attachEvent("onmousedown",getMousepoints);
then it is not able to dectect the mousedown()event but the below line is working.
document.Column3D.attachEvent("onmousemove",getMousepoints);//------------- this is working
Please help me. It is very important to me to capture the x,y axis values on click of fusionCharts.
Thanks.
<html>
<head>
<title>Data Chart</title>
</head>
<body bgcolor="#ffffff" >
<object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=8,0,0,0" width="900" height="300" id="Column3D" onclick="sendPoints(document.f1.xvalue.value) " >
<param name="movie" value="../FusionCharts/Column3D.swf" />
<param name="FlashVars" value="&dataURL=myData.xml">
<param name="quality" value="high" />
<embed src="../FusionCharts/Column3D.swf" flashVars="&dataURL=myData.xml" quality="high" width="900" height="300" name="Column3D" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer" />
</object>
<script type="text/javascript">
var IE=document.all?true:false
document.onmousemove=getMousepoints;// ----------this is working
document.onmousedown=getMousepoints;// ----------- this is working
//document.Column3D.attachEvent("onactivate",check);//----------- this is working
//document.Column3D.attachEvent("onmousemove",getMousepoints);//------------- this is working
//document.Column3D.onmousedown=check;
var mousex=0;
var mousey=0;
function getMousepoints()
{
mousex=event.clientX+document.body.scrollLeft //to get client window X axis
mousey=event.clientY+document.body.scrollTop//to get client window Y axis
document.f1.xvalue.value=mousex;//put values
document.f1.yvalue.value=mousey;//put values
return true;
}
function sendPoints( xvalue)
{
alert("inside function :" + xvalue);
document.f1.down.value=document.f1.xvalue.value;
}
function check()
{
alert("Check :" + document.f1.xvalue.value);
sendPoints(document.f1.xvalue.value);
}
</script>
<div align="left">
<form name="f1">
<p> X-value
<input name="xvalue" type="text" size="5" onclick="sendPoints(document.f1.xvalue.value)">
</p>
<p>Y-value
<input name="yvalue" type="text" size="5">
</p>
<p>Mouse Down
<input name="down" type="text" size="5">
</p>
<p>
<embed src=" " onclick="sendPoints(document.f1.xvalue.value) " > Hi---------------- </embed>
</p>
</form>
</div>
<H1 onclick="sendPoints(document.f1.xvalue.value)"> Hello </h1>
</body>
</html>
Problem in Using JavaScript functions as links
in Javascript Problems
Posted · Edited by Guest · Report reply
Hi Sudipto,
Thanks for reply