Connecting Tech Pros Worldwide Help | Site Map

Using functions in an ActiveX ocx file through JavaScript

 
LinkBack Thread Tools Search this Thread
  #1  
Old July 17th, 2006, 07:35 AM
ritulranjan@gmail.com
Guest
 
Posts: n/a
Default Using functions in an ActiveX ocx file through JavaScript

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.


  #2  
Old July 18th, 2006, 11:35 AM
ritulranjan@gmail.com
Guest
 
Posts: n/a
Default Re: Using functions in an ActiveX ocx file through JavaScript

Help required!

  #3  
Old July 19th, 2006, 12:15 PM
Vincent van Beveren
Guest
 
Posts: n/a
Default 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
  #4  
Old July 24th, 2006, 07:55 AM
Ritul
Guest
 
Posts: n/a
Default 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.

 

Bookmarks

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Popular Articles

What is Bytes?

We are a network of experts and professionals in IT and software development that help one another with answers to tough questions and share insights. Get the best answers to your questions from over 220,662 network members.