Single Sign On through IE - javascript

I'm currently building a web interface that lists a load of data for data entry to peruse through. The website doesn't actually update our back end though. We have a vendor supported custom built Windows application which we use for our data entry.
This web interface is replacing some excel lists + VB. The Excel version of this system is able to pass some data to an already open instance of a custom Windows application and bring into the app a certain ID that's clicked on in Excel, so I'm trying to replicate this from the browser.
So far I'm able to get close by using this JavaScript within IE:
<script type="text/javascript" language="javascript">
function RunFile() {
WshShell = new ActiveXObject("WScript.Shell");
WshShell.Run(pathToApp, 1, false);
}
RunFile()
</script>
But this method I believe tries to open a new instance of the Windows Application. Not access the currently open version. I think looking at the VB code I need to use the windows "sendKeys" method.
It's not something I've ever done before, or needed to do. So It's very new to me.
Is it possible to pass data to an already open Windows app via a browser?
Are there any other options available, I was thinking maybe Electron could help here maybe? Or am I wrong and fighting a losing battle on this front?

Scenario sounds really complex but maybe you should check if this windows app can be integrated with Office Add-Ins.
From their site:
What can an Office Add-in do?
An Office Add-in can do almost anything a webpage can do inside the browser, such as the following:
Extend Office native UI by creating custom ribbon buttons and tabs.
Provide an interactive UI and custom logic through HTML and
JavaScript.
Use JavaScript frameworks such as jQuery, Angular, and
many others.
Connect to REST endpoints and web services via HTTP and
AJAX.
Run server-side code or logic, if the page is implemented using
a server-side scripting language such as ASP or PHP.
In addition,
Office Add-ins can interact with the Office application and an add-in
user's content through a JavaScript API that the Office Add-ins
infrastructure provides.
Web app
The minimal version of a compliant web app is a static HTML webpage. The page can be hosted on any web server, or web hosting service, such as Microsoft Azure. You can host your web app on the service that you choose.
The most basic Office Add-in consists of a static HTML page that is displayed inside an Office application, but doesn't interact with either the Office document or any other Internet resource. However, because it is a web application, you can use any technologies, both client and server side, that your hosting provider supports (such as ASP.net, PHP, or Node.js). To interact with Office clients and documents, you can use the office.js JavaScript API that we provide.

Related

Open mobile app (if installed) using javascript (without intent)

From web browser, I want the ability to open any app if installed (such as facebook, twitter etc) using java-script. I can't update intent file, want to do it solely from java-script. Is there a way from java-script to detect the installed apps (from IOS & Android) and open it?
You can use Firebase Dynamic Links https://firebase.google.com/docs/dynamic-links
It was designed to resolve the issues like yours.

android app with apache cordova

I'm developing a web app using HTML5,CSS3 and JavaScript.
Then I want to use the Apache ordova platform to generate a native android app from my web app but I still don't understand what do I need for this,specially do I need a server-side development with php for example??
First off i suggest you read this
Pretty much your app will be able to accomplish a little bit more than what you would be able to do in a browser if all you had available was the ability to write html/js*.
*by this i mean that you have access to device-specific hardware which is not available in a browser and a few more things but pretty much that's it.
You will need to install node.js (or io.js), then install cordova through npm, and make sure you have the Android SDK installed. Once you create your project, your html/css/js will be wrapped into a native webview component, you do not need any server to render it, effectively your app is a native app that can be installed from google play.
You will need a server, typically a RESTful API, if your app needs to query data remotely or persist to some third party. If you are thinking through a classic MVC mindset (render a page through some php code) then you probably need to read about cordova and how it works. A cordova app is a client-side only app, no server-side processing is possible unless through a network communication to a server you have access to on the internet. You can do persistence locally (to the android device) and even use a local database, but remember that this db exists on the device, so you won't be able to share information between users unless you somehow coordinate that through your app (and most likely a server-side app / rest api).
It is unlikely that your existing web app can be wrapped into a cordova app straight away, cordova apps are single page apps mostly.

How to use the browser as the GUI for an offline application?

I want to be able to create an offline program that can use the browser as GUI. I'm not particularly good at GUI programming in general, and overall it seems that using HTML and CSS to structure a GUI would be the easiest.
Cross browser method is preferred, but I will most likely use Google Chrome
I need to be able to open an external program, possibly with command line arguments
Javascript seems like the best language for this, however as far as I know it isn't possible to launch programs with it.
This is on Windows 7.
That's a good idea and is done by a several popular softwares.
The best way is to make your offline program run a web server that the browser will be able to access.
ie: Your program starts a web server on localhost:5555 and then you'll be able to request http://localhost:5555/users in Javascript, from your browser.
Another approach could be using a UI framework like AngularJS + local storage. I'm working on an app right now that will be used online (connected to the web), online locally (connected to a local server that is not connected to the web), and offline.
You could build a single-page web app and let Angular manage all the "urls".

How to access windows certificate store in javascript?

I want to access the windows certificate store through javascript... I want to develop a web application and wants to validate the login user against the certificate by reading it.
As far as I know it is not possible from a web application without using native bridge (fir instance through some java applet or activeX component).
There is currently a W3C working draft for a Web Cryptography API. Some browser vendors are currently working on this API (Mozilla or Microsoft) but it is far from being production ready.

HTML5 Application (server or client side) using phonegap

I need to develop an HTML5 mobile business application using PhoneGap. After finishing my application I want to make it a native app.
Can anyone tell me What is the best way to do it
Develop an application using HTML5 and Javascript, call web services from Javascript and embed it in a native app using PhoneGap
Develop an application using HTML5, Javascript and PHP. (server side). use PHP to call web services. use PhoneGap to call server urls.
1st one seems more native and fast. 2nd one seems more flexible and secure, but I need an additional server for that.
so what is the best solution?
Although I agree this is too wide a question, I would go with #1 because certainly in the case of Apple and iOS I am pretty sure you would not be able to get an app past Apple's gatekeepers if it loaded remote code (Javascript, etc).
Calling out to a web service for remote data via AJAX, etc is fine however.

Categories