So, I am trying to handle activeX events in the JS. I established a connection and I am firing an event in ActiveX using PDispatch->Invoke method.
It just seems like my JS is not recognizing an event. And on the function Add::OnTalk() line it gives me warning about ::
Anyone came across similar problem?
ATL 8.0 test page for object Add
//function that should handle events fired by ATL in ActiveX function Add::OnTalk() { alert("I recieved an event from ActiveX"); } //end of this piece of code function OnLoad() { try { if (Add.object != null) { //btnIsOfflineAllowed.disabled = false; } } catch (e) { alert(e.message); } } function MakeConnection() { try { if (Add.object != null) { alert("I'm here"); Add.OnTalk(); } } catch (e) { alert(e.message); } } <div>
<input type="button" id="btnIsOfflineAllowed" value="Make a Connection" onclick="MakeConnection()"/>
</div>