Connecting Tech Pros Worldwide Forums | Help | Site Map

Using functions in an ActiveX ocx file through JavaScript

ritulranjan@gmail.com
Guest
 
Posts: n/a
#1: Jul 17 '06
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.


ritulranjan@gmail.com
Guest
 
Posts: n/a
#2: Jul 18 '06

re: Using functions in an ActiveX ocx file through JavaScript


Help required!

Vincent van Beveren
Guest
 
Posts: n/a
#3: Jul 19 '06

re: Using functions in an ActiveX ocx file through JavaScript


Hi Ritul,

Well, I'm by no means an expert in active X and stuff, but I'll take a
shot at your question.
Quote:
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
Ritul
Guest
 
Posts: n/a
#4: Jul 24 '06

re: Using functions in an ActiveX ocx file through JavaScript


Hi Vincent,

Thanks for replying.
Quote:
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.

Closed Thread