Tuesday 15 May 2012

Handle COM object events in JavaScript -


I have a COM object that picks events and javascript on the web page to capture those events. Works now I have to "distribute" many other web applications (this is all internal intranet stuff) to use this javascript on their web pages.

The Javascript function and script tag for the event sync is here:

   

How can I put it in a separate .js file? Or will he have to stay on the page?

The object tag is on the ica object page:

  & lt; Object Classid = "clsid: 55527FAD-5E60-4F44-867B-9F6E7B0DB9DD" id = "ica" name = "ica" & gt; & Lt; / Object & gt;  

Regarding my comment, I tried it right now and it works fine While working with embedded COM objects in Fashion, I came to know that you have & lt; Script & gt; No need to specify for and events attributes on tags In our case, we have a single & lt; Script & gt; tag that has 3 different context handlers

objectID :: Eventname within them.

Since this was right, I have just moved the contents of this script tag to a different JS file and it is normally referred to - everything still works according to it.


No comments:

Post a Comment