Page 1 of 1

How to use JScript control ActiveX event?

Posted: Thu May 27, 2004 6:56 am
by 6923785
Hello everybody:

I am trying to use JScript to respond the event of ActiveX. For example: If i click the ActiveX--Button by right clicking the mouse, I hope to get data of the point that i clicked.How to composed such function using JScript?

Thanks

Posted: Thu May 27, 2004 8:23 am
by Pep
Test..

Posted: Thu May 27, 2004 8:57 am
by Pep
Hi,

you can use similar code the the following example (which uses the OnClickSeries event) :

Code: Select all

<HEAD>

<TITLE>Set Tee Chart type - JScripted version</TITLE></HEAD>
<BODY onload="SetLoad()">

SCRIPT LANGUAGE=JAVASCRIPT
function SetLoad(){
  TeeCommander1.ChartLink = TChart1.ChartLink;
  TChart1.Aspect.View3D = false;
  TChart1.AddSeries(1);
  TChart1.Series(0).FillSampleValues(7);
  TChart1.Axis.Bottom.Labels.Style = 3;
}
/SCRIPT

SCRIPT LANGUAGE="JScript" FOR="TChart1" EVENT="OnClickSeries(SeriesIndex,
ValueIndex, Button, Shift, X, Y)">
TChart1.Header.Text.Clear();
TChart1.Header.Text.Add(ValueIndex);
/SCRIPT

<object ID="TeeCommander1" WIDTH="600" HEIGHT="33" align="center"
CLASSID="clsid:B6C10532-FB89-11D4-93C9-006008A7EED4"></object>
<object ID="TChart1" WIDTH="600" HEIGHT="500" align="center"
CLASSID="clsid:B6C10489-FB89-11D4-93C9-006008A7EED4">
</object>