473,657 Members | 2,700 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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.

Jul 17 '06 #1
3 4070
Help required!

Jul 18 '06 #2
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
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="_StockPro ps" 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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

7
2815
by: NewbieJon | last post by:
I am attempting to send the variable "sComputerName" from my ActiveX script to "GetInfo.asp" using javascript. (Having been advised this is the way to get my ActiveX variable into my ASP script) My code is below. I am getting the following error "MyForm.oNetwork.Value is Null or is not an object". I'm struggling to diagnose what to do next. I'd very much appreciate some help Many thanks <HTML><BODY><FORM NAME="MyForm"...
6
23744
by: Sergio Otoya | last post by:
Hi all, Is there any way of copying a file using javascript, not using the Filesystemobject (ActiveX). I need this to run in Windows and MACS. Any help would be greatly appreciated. Thanks in advance. Sergio Otoya.
12
3433
by: knocte | last post by:
Hello. I have always thought that the eval() function was very flexible and useful. If I use it, I can define functions at runtime!! However, I have found a case where eval() does not work properly. It works, for example, when invoking functions (alert('hello')), but not for defining functions. The case occurs when retrieving the javascript code with
5
1810
by: Andrew | last post by:
Hi all, I am still getting into ASP/VB.net and have a concern about something I see coming. Currently our entire website is classic ASP, yet the feelings from on high is that we need to start looking into updating the site to ASP.net. For the most part I am in favor of this, but I am concerned about the ActiveX objects we are using. For example: I needed to provide the means for a user to upload multiple files via a webpage. To...
4
3421
by: qualitynice | last post by:
HELP :-)... I'm creating an embedded activex object in an asp.net page using the HtmlGenericControl class. I'm doing this because when I tried to embed it directly in the aspx page, it stopped working once I changed it to run on the server (runat="server"). It said the GUID was wrong. I found code showing how to implement an activex control using the HtmlGenericControl class from the code behind file, but I can't figure out how to call...
0
1377
by: Frank | last post by:
I am attempting to convert an asp file to a asp.net file using C#. The original file has an ActiveX control which is contained in a cab file. The cab file contains the .ocx file which connects to a socket and transfers client info to a server, as well as several .dlls The cab file also references another cab file which contains files to install on the client machine in case they do not have VBRuntime6 installed on their machine.
0
4922
AnuSumesh
by: AnuSumesh | last post by:
Hi All, I want to call RDP on Page load and it is working fine.My code is in C#. But I am unable to perform following functions 1. when i disconnected from RDP, i want to go back to previous page 2. If RDP is opened in fullscreen mode, then onconnected, i want to go back to previous page.
3
2840
by: =?Utf-8?B?QmlsbHkgWmhhbmc=?= | last post by:
I have a asp.net app, in the page there is a scan activex which could scan and save a jpg file in client harddisk. How could we access and display this jpg file on the fly using js in the client IE? Thanks, -Billy zhang
3
8255
Frinavale
by: Frinavale | last post by:
Hi there! I'm hoping that someone knows how to check the size of a file before it is uploaded to the server using JavaScript. I have seen suggested solutions using an ActiveX control to check the file size; however, I'm not happy with this solution because my application is designed to work in multiple browsers and ActiveX is limited to Internet Explorer. I cannot check the file size on the web server because IIS throws the following...
0
8407
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
8319
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
8837
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
8739
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
0
8612
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
7347
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
6175
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
1
2739
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
1732
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.