0

In our web application, we used to use a Java applet to invoke MS. Office applications e.g. Word to open, edit, and save back a file to the server.

Google Chrome will no longer support NPAPI, so soon we can not run our applet in Chrome anymore. Plus, it seems that MS. Edge is not willing to support Java.

So, any suggestions for an alternative for the Java applet. We want to make the same experience for the user, just like before: we do not want to open the files in the browser, or at least try giving the user the same experience as before, meaning a neat editor to edit/save his/her file.

I have also tried Html5 features e.g. FileSystem API. But, it turned out to me that at least that feature cannot help me. (to my knowledge, maybe I am missing something)

Summary: How to launch client applications e.g. MS. Word using Javascript/Html5 without any applets/activeX?

Andrew Thompson
  • 168,117
  • 40
  • 217
  • 433
Reza Ahmadi
  • 357
  • 3
  • 12
  • I don't know of any software that doesn't require a plugin to be installed by the client, that can do that... Which isn't very surprising, otherwise, malicious websites would be opening instances of word all over the place. – Cerbrus May 27 '15 at 10:09
  • Do you have control over the computers the browser runs on ? – Marged May 27 '15 at 10:10
  • Well, no we do not have control over the computers. But, Html5 is supposed to help in that, then how? Let's make this safe e.i. to not to allow any website access the client's machine programs etc. Then, how to e.g. edit an excel file on the client's machine and send it to the server? what would be the best approach? – Reza Ahmadi May 27 '15 at 10:34
  • I made a minor change to my question – Reza Ahmadi May 27 '15 at 10:38
  • As it may be impossible to reach all three goals you should rate which of the three (open, edit, and save back ) are most important to you. Do you only search a solution for MS Office (better name which, I don't think you need MS Access ;-)) or other applications too ? – Marged May 27 '15 at 13:14

2 Answers2

0

From what I'm understanding is you want a way to open an a file using a specific application (MS Word?) and then when the user saves the file it is automatically updated to the server?

You can achieve this by storing the file as a temporary file and automatically checking if the file has changed every few seconds.

This can be achieved using a real-time javascript framework such as NodeJS. The application launch could be met using the following: https://msdn.microsoft.com/en-us/library/aa767914(VS.85).aspx

Or perhaps a direct <a href="file://C:/path/to/temp/word.docx">Word</a> would work.

jaeko44
  • 84
  • 2
  • 11
  • Thanks for the answer. I can use a "check-in" button to send the find to a server, too. But, my main issue is to lunch the client application for now. Do you mean such a link, that you have provided, will lunch e.g. Word on the client's machine to open word.docx? Also, how about Chrome? as apparently works only with IE? – Reza Ahmadi May 27 '15 at 12:22
  • Word This would open the 'word' file with the default program. – jaeko44 May 30 '15 at 14:54
0

I know of no way to allow a web application launching local files / programs without some intervention by the user. He will as far as I know always need to accept some kind of plugin or will be prompted for some action.

There is one technique I like very much and it is relatively "lightweight": you could give your users the opportunity to either invoke Word manually or setup their computer to support a certain url handler. You can find a description of url handlers here: msdn.microsoft.com/en-us/library/aa767914%28v=vs.85%29.aspx. After this is set up your application could offer a link similar to msword://file0815.doc. You only need a small programm on the computer to react on this, the same program could combine the installer and setup function (you need some registry entries).

I have seen this in combination with DMS applications and it works quite well, uTorrent does the same for torrent downloads. Internet Explorer and Chrome support this for sure, and I am sure Firefox will too.

Marged
  • 10,577
  • 10
  • 57
  • 99