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>