3

I'm trying to develop an website that can use a specific mailing program (lotus-notes), but to do so, I need to create a Session with the application that usually was created using an ActiveXObject() object. The problem is that I won't be the end user of the website, and I do not want to create a website not user friendly, always asking for the user to add extensions in order to make the website functionalities work.

I am doing my best to find a workaround to the use of ActivateXObject(), encapsulating the application in the best way I can, so is there any kind of plugin that I can add through JavaScript to my website in order to use ActiveXObject() or any equivalent function?

Akssimiro
  • 35
  • 5

2 Answers2

1

No, there isn't. To create a COM object (which is what ActiveXObject did), you'd need to use a browser with native support for ActiveX (old IE) or a browser you could use and/or write an old-style (NPAPI) "plugin" on.

All major browsers have discontinued or are actively (no pun) discontinuing support for the NPAPI plugin mechanism because of the security issues around it.

For instance, I think the SilverLight plugin might have been able to create COM objects, but as it's implemented as an NPAPI plugin, it is rapidly disappearing (and was EOL'd by Microsoft in 2012; they support SilverLight 5 through 2021, but that doesn't help you).

There is no replacement technology that can create COM objects from JavaScript code running in a web page in a standard browser at this time.

T.J. Crowder
  • 1,031,962
  • 187
  • 1,923
  • 1,875
  • Thanks for the help! I still have to find a way to use a COM object in a transparent way, avoiding to bother the user with configuration details. Do you know if is there any way to do it, even if it does not involve JavaScript? – Akssimiro Jun 23 '16 at 17:17
  • @Akssimiro: Not from a browser, no. – T.J. Crowder Jun 23 '16 at 17:19
0

I have a COM object that I call from a regular webpage using Javascript. I also do calls directly into a Domino database (the database used by IBM Notes).

What you could do is to write all your functionality on the server, then call the functions from the browser using Javascript. Simply build a wrapper around the functionality you want to expose to your web application. You can then perform Ajax calls to the server to do things or retrieve data.

You can find more info in the following two presentations:

http://blog.texasswede.com/mwlug-2015/

http://blog.texasswede.com/my-connect-2016-presentation-demo-database/

Karl-Henry Martinsson
  • 2,770
  • 15
  • 25
  • Sorry for the late reply. The function needs to be executed at the client side in order to use the mailing client of the user. Right now I have a work-around to this situation. I would have to use a COM object in order to automatically send e-mails with the Lotus Notes application, and I'm currently replacing it with a mailto functionality in javascript. It adds one more step to the process and depending on the number of e-mails that the user has to send, it may take some time to send all messages, but more than half of the job is done by JavaScript code. Thank you for the help anyway! – Akssimiro Jul 13 '16 at 15:44