Skip to main content
Interfacing the Lega suite from regular web page on button click, triggering JavaScript code, where using below code to create instance of the LegaOIS.LegaOISCtrl.1 and it is not working in Chrome as it doesn't support AcitveX object. Any solution or alternative ways ?


var  LSObject = new ActiveXObject("LegaOIS.LegaOISCtrl.1");

------------------------------
Sai Golem
OneMain Financial
Evansville IN US
------------------------------
Interfacing the Lega suite from regular web page on button click, triggering JavaScript code, where using below code to create instance of the LegaOIS.LegaOISCtrl.1 and it is not working in Chrome as it doesn't support AcitveX object. Any solution or alternative ways ?


var  LSObject = new ActiveXObject("LegaOIS.LegaOISCtrl.1");

------------------------------
Sai Golem
OneMain Financial
Evansville IN US
------------------------------
Hi Sai,

Unfortunately indeed modern browsers often prevent the use of COM / ActiveX access for security reasons.

Older browsers like IE supported this, and it is still possible to use this in Edge when using the IE tab. 
The new version of Edge is based on the Chromium platform, so in that sense very similar to Chrome with the extension that an IE tab can be used to make these things still possible.

As modern browsers are 'sandboxing' the environments, which means they are disabling the ability to control other applications from the browser, solutions for integration may need to shift. With these security enhancements you can question if the browsers and their javascript are the best way for desktop  integration.

Depending your requirements and ability of tools other ways of integrating can be found. This might require some changes to your projects though.

Regards,

------------------------------
Roger van Valen
Senior manager, software engineering
Rocket Software
Dordrecht, The Netherlands
------------------------------
Hi Sai,

Unfortunately indeed modern browsers often prevent the use of COM / ActiveX access for security reasons.

Older browsers like IE supported this, and it is still possible to use this in Edge when using the IE tab. 
The new version of Edge is based on the Chromium platform, so in that sense very similar to Chrome with the extension that an IE tab can be used to make these things still possible.

As modern browsers are 'sandboxing' the environments, which means they are disabling the ability to control other applications from the browser, solutions for integration may need to shift. With these security enhancements you can question if the browsers and their javascript are the best way for desktop  integration.

Depending your requirements and ability of tools other ways of integrating can be found. This might require some changes to your projects though.

Regards,

------------------------------
Roger van Valen
Senior manager, software engineering
Rocket Software
Dordrecht, The Netherlands
------------------------------
Thanks Roger! Appreciate your response.

Requirement : 
Legasuite application session will be open on the user machine and when user click on third party web page button, the below javascript of the web page connect to the legasuite application session and runs script.
Please let me know if you have any questions.


var ojwalk = new ActiveXObject("LegaOIS.LegaOISCtrl.1");
var session_id = 0;
var connect_mode = GF_CONNECT_LOCKED;
ojwalk.MainSessionConnect(session_id, connect_mode);
if (ojwalk.Error == 0) {
try {
ojwalk.MainWindowSetMode(GF_WIN_RESTORED_FOCUS, session_id);
if (wShell != null) wShell.AppActivate("AA0");
if (wShell != null) wShell.AppActivate("LV0");
if (wShell != null) wShell.AppActivate("LC0");
ojwalk.ScriptGlobalSet("passparam", param, GF_SCRIPT_VAR_STRING, session_id);
ojwalk.ScriptCall("scriptname", session_id);

------------------------------
Sai Golem
OneMain Financial
Evansville IN US
------------------------------