Handling COM events from Javascript

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Almog Levin
    New Member
    • Jul 2008
    • 2

    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.eventna me=function, to no avail.
    What am I missing?
    Thanks in advance!
    Almog.
  • acoder
    Recognized Expert MVP
    • Nov 2006
    • 16032

    #2
    Welcome to the forum.

    You're obviously coding for IE only. Have you checked the docs at MSDN?

    Comment

    • Almog Levin
      New Member
      • Jul 2008
      • 2

      #3
      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!

      Comment

      • acoder
        Recognized Expert MVP
        • Nov 2006
        • 16032

        #4
        Originally posted by Almog Levin
        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.

        Comment

        Working...