473,799 Members | 3,106 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Handling COM events from Javascript

2 New Member
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.eventna me=function, to no avail.
What am I missing?
Thanks in advance!
Almog.
Jul 6 '08 #1
3 1870
acoder
16,027 Recognized Expert Moderator MVP
Welcome to the forum.

You're obviously coding for IE only. Have you checked the docs at MSDN?
Jul 7 '08 #2
Almog Levin
2 New Member
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 Recognized Expert Moderator MVP
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
2810
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 when menu items are clicked.Besides these i would like to put a custom status bar. Any error message encountered in any of the webpage will be displayed in the banner. The problem iam encountering is how to access the customer status bar in child...
4
2096
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' Effects to set Opacity to 1 for the active div and 0.5 for the inactive ones). Using prototype's event handling, I can see two ways to get this done:
4
2640
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 I'm guessing its something to do with the "onload" command at the end of the code. The code works just fine if I paste it into the <head> tag of my web page adding the standard javascript open and close <script> tags, but as soon as I save it as...
0
9541
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
10251
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...
1
10228
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
10027
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
9072
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...
0
6805
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 then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5463
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
1
4141
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
3759
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.