I have a web page published from Excel that contains a PivotChart and a PivotTable in the form of Office Web Components. I would like to capture the coordinates of a mouse click and utilize those coordinates in a method of the Chart component.
I have been successful in trapping a click on the chart using the following code...
...and...
...except that the references to event.clientX and event.clientY produce...
Error: Object required.
I have also had success in producing coordinates using the following code...
...and...
...from a tutorial on events. The problem with this is that it only traps clicks on the page itself, but not on the PivotChart component.
I have been studying bubble and capture event models, but am, as of yet, unable to make this work.
Any help?
Thanks!
Ray <><
"I was going to change my shirt, but I changed my mind instead." - Winnie the Pooh
I have been successful in trapping a click on the chart using the following code...
Code:
<head>
<script language='javascript'>
function EAC_History_19179_Chart_Click()
{
alert(event.clientX);
alert(event.clientY);
}
</script>
</head>
...and...
Code:
<body>
<script language='javascript' for='EAC_History_19179_Chart' event=Click()>
EAC_History_19179_Chart_Click();
</script>
</body>
...except that the references to event.clientX and event.clientY produce...
Error: Object required.
I have also had success in producing coordinates using the following code...
Code:
<head>
<script language = 'javascript'>
function Yeehah()
{
alert ("You clicked at screen coordinates ("
+ event.clientX + ","
+ event.clientY + ")");
}
</script>
</head>
...and...
Code:
<body>
<script language='javascript'>
document.onclick = Yeehah;
</script>
...from a tutorial on events. The problem with this is that it only traps clicks on the page itself, but not on the PivotChart component.
I have been studying bubble and capture event models, but am, as of yet, unable to make this work.
Any help?
Thanks!
Ray <><
"I was going to change my shirt, but I changed my mind instead." - Winnie the Pooh