By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
459,287 Members | 1,644 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 459,287 IT Pros & Developers. It's quick & easy.

Using functions in an ActiveX ocx file through JavaScript

P: n/a
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 <objecttag 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.

Jul 17 '06 #1
Share this Question
Share on Google+
3 Replies


P: n/a
Help required!

Jul 18 '06 #2

P: n/a
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
Jul 19 '06 #3

P: n/a
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.

Jul 24 '06 #4

This discussion thread is closed

Replies have been disabled for this discussion.