473,487 Members | 2,674 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

How to capture ActiveX Exe event in javascript?

I know this question has been asked a million times but I still can't
get an event from an embedded ActiveX Exe to be caught in javascript.
I am able to access all the properties and methods of the ActiveX Exe,
I just can't seem to catch the event.

I've declared my object as follows:

<OBJECT
ID = "Test3"
CODEBASE = "http://www.amys-attic.com/Test3.exe"
CLASSID = "CLSID:2ACAEF35-445C-4717-8ACB-A3423E8D64EB"
style="display:none;">
</OBJECT>

My javascript event handler is as follows:

<script language="javascript" for="Test3"
event="PipeEvent(bIsPresent)">
alert("Pipe Detect");
</script>

The event handler never fires. I debugged the ActiveX Exe and verified
that the event is indeed being raised.

I am able to catch the event in a VB6 test container project as well.

Any ideas?

Jul 19 '06 #1
3 8342
Hi Chad,
<script language="javascript" for="Test3"
event="PipeEvent(bIsPresent)">
alert("Pipe Detect");
</script>

The event handler never fires. I debugged the ActiveX Exe and verified
that the event is indeed being raised.
It might be that you don't need to specify the arguments:

<script language="javascript" for="Test3" event="PipeEvent">
alert("Pipe Detect");
</script>

You can then query window.event for the properties. Note though that I
have never done this :)

Vincent
Jul 20 '06 #2
Thank you for the reply Vincent. I had already tried it without the
event parameter and the event still does not fire. We are completely
stumped since all the documentation and posts to this group show that
my implementation should work. I'm going to try and write a very
simple barebones test ActiveX exe and see if I can get it to work.

Thank you once again!
Vincent van Beveren wrote:
Hi Chad,
<script language="javascript" for="Test3"
event="PipeEvent(bIsPresent)">
alert("Pipe Detect");
</script>

The event handler never fires. I debugged the ActiveX Exe and verified
that the event is indeed being raised.

It might be that you don't need to specify the arguments:

<script language="javascript" for="Test3" event="PipeEvent">
alert("Pipe Detect");
</script>

You can then query window.event for the properties. Note though that I
have never done this :)

Vincent
Jul 20 '06 #3
VK

Chad Johnson wrote:
stumped since all the documentation and posts to this group show that
my implementation should work.
You must be reading them wrong ;-)
I'm going to try and write a very
simple barebones test ActiveX exe and see if I can get it to work.
I suggest to do so only after you study
<http://support.microsoft.com/?id=200839and re-write your ActiveX
accordingly.

The core of the problem is that you are assuming JScript events and
ActiveX events being of the same nature and being propagated in the
same container (UA). In fact they have /nothing/ in common neither in
the execution context nor in used interfaces. They have no idea of each
other unless explicetly programmed to inform each other. Think of Word
window and Excel window: if you click your mouse in the Word
application, Excel is not informed of it (unless your custom VBA takes
care of it).

Jul 20 '06 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

10
3378
by: Greener | last post by:
Hi, I need help badly. Can you do client-side programming instead of server-side to capture the Browser type info? If this is the case, what's wrong with the following? <script...
1
3012
by: mjcast | last post by:
I have been working on an ActiveX control in C#. It is packaged in a Windows Control library and the code is in a user control. The control is used as an automation receiver that is used to update a...
2
4992
by: jva02 | last post by:
Hi, I'm confused why I can capture an event fired by an ActiveX object when it's loaded via an <object> tag, but not when loaded using "new ActiveXObject". Here's a basic example: vb ActiveX...
4
4787
by: Bill Manring | last post by:
I need to capture the event when the user closes the browser in my application. I have some code in the session_End event, which works fine when the session times out, but I need to end the...
5
3110
by: ewillyb | last post by:
Hi, ASP.NET has some interesting behavior when the user hits the Enter key. If there are multiple ASP:Buttons (rendered as HTML submits) on the form, when the user hits enter, the first button's...
5
3289
by: Diego | last post by:
How do I capture a cancel event of Printer dialog box? Regards, Diego
1
8229
by: kret | last post by:
Hi, this is my first post so first of all I would like to say hello :) Now getting to my problem. In my job I have to create an ActiveX control in .NET 1.1 that can be lunched from IE....
7
5577
by: Lit | last post by:
Hi, How can I capture the vertical scroll bar position for a Listbox. I have a Listbox of 100 items + when I click on it I post back remove the item selected. After returning to the client...
9
2416
by: Hirru | last post by:
Hi................., i want to capture event from vb dll file in javascript,actually i can already access all the function of that dll from javascript but i don know how to capture event raised by...
0
7106
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,...
0
6967
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...
0
7181
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...
0
7349
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...
1
4874
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...
0
4565
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
3071
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
600
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
267
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...

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.