473,322 Members | 1,562 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,322 software developers and data experts.

Handling COM events from Javascript

Hi everyone, I'm new to this forum and new to JS, I was hoping someone could help me.
I've had some code, written by my predecessors in the company, in which some Javascript was handling events of a VB6 object using the FOR/EVENT syntax. I was asked to replace the VB6 with an ATL object. I did, with the same class Id and everything, but the Javascript no longer registers for the event. The object methods are called, but the events are not raised. I debugged the COM object, the event is indeed fired and there are 0 connections. I was also able to handle these events in VB6.
I tried to replace the FOR/EVENT syntax with object1.eventname=function, to no avail.
What am I missing?
Thanks in advance!
Almog.
Jul 6 '08 #1
3 1853
acoder
16,027 Expert Mod 8TB
Welcome to the forum.

You're obviously coding for IE only. Have you checked the docs at MSDN?
Jul 7 '08 #2
I have, and I can't see why my code doesn't work. Are you concluding that I'm writing for IE because I'm using the FOR/EVENT syntax? It's just what my predecessor did, I'm willing to try alternatives...
Thanks again!
Jul 15 '08 #3
acoder
16,027 Expert Mod 8TB
Are you concluding that I'm writing for IE because I'm using the FOR/EVENT syntax?
Yes, but in this particular case, it may make sense if it's for a controlled user environment, e.g. an intranet.

I don't know much COM/ATL stuff but if you post your code, I, or someone else, may be able to help.
Jul 15 '08 #4

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

Similar topics

12
by: scsharma | last post by:
Hi, I am working on creating a webapplication and my design calls for creating main webform which will have menu bar on left hand side and a IFrame which will contain all the forms that are shown...
4
by: reggiestyles | last post by:
Hi, I've got a question about prototype and event handling. I've got several div's (dynamic number) on a page that I want to set as active or inactive (basically, I'm using scriptaculous'...
4
by: hyperman7 | last post by:
I saved the code below to an external file which I called colorFader.js, and I'm calling it with: <script type="text/javascript" src="js/colorFader.js"></script> My path (above) is correct, so...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
1
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 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 former...

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.