Using functions in an ActiveX ocx file through JavaScript

R

ritulranjan

Hi,

I am new to Javacript, so please forgive any trivial queries made.

I want to use functions in an .ocx file, in a web page. The web page
uses the <object> tag to embed the ActiveX object, and the ActiveX
object is such that, only one instance of the object can be
instantiated, so i can't call the ActiveXObject() function, while the
ActiveX object is embedded in the web page.

Is there any way I can create the object using "new ActiveXObject()"
function and then use the object to render content on the web page as
well as to call internal functions, on events such as button press,
etc.

Thanks in advance.

regards,
Ritul.
 
V

Vincent van Beveren

Hi Ritul,

Well, I'm by no means an expert in active X and stuff, but I'll take a
shot at your question.
Is there any way I can create the object using "new ActiveXObject()"
function and then use the object to render content on the web page as
well as to call internal functions, on events such as button press,
etc.

Well, yes, you can create it the way you describe, and probably even
script it that way. However, you can not render it as if you embedded
it. You migth however query the object and build your own interface
around it.

What do you want to accompisch? Why not use the embedded object?

Vincent
 
R

Ritul

Hi Vincent,

Thanks for replying.
What do you want to accompisch? Why not use the embedded object?

I have an ActiveX control that renders some video transmitted through
network. I have successfully embedded the control in the webpage (using
object tags and class id).

Now, I need to pass events to the control (like play, pause, etc.) from
javascript. Also, i have a limitation that only one instance of the
control can be loaded at one time.

How can I call different function in the OCX control file, depending
upon the event generated?

Here is how I have embedded the control in the webpage:

<OBJECT ID="ObjectID" CLASSID="OBJECT CLASS ID HERE" title="My World"
style="width: 370px; height: 276px" VIEWASTEXT>
<PARAM NAME="_Version" VALUE="65536">
<PARAM NAME="_ExtentX" VALUE="10187">
<PARAM NAME="_ExtentY" VALUE="7567">
<PARAM NAME="_StockProps" VALUE="0">
</OBJECT>

Can I use the ObjectID to call different functions in the ActiveX
control (OCX file)? If yes, how? if no, is there any other way to do
what I want to do?

regards,
Ritul.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,982
Messages
2,570,189
Members
46,735
Latest member
HikmatRamazanov

Latest Threads

Top