By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
437,569 Members | 1,164 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 437,569 IT Pros & Developers. It's quick & easy.

Handling COM events from Javascript

P: 2
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
Share this Question
Share on Google+
3 Replies


acoder
Expert Mod 15k+
P: 16,027
Welcome to the forum.

You're obviously coding for IE only. Have you checked the docs at MSDN?
Jul 7 '08 #2

P: 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
Expert Mod 15k+
P: 16,027
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 discussion thread is closed

Replies have been disabled for this discussion.