HI
I need to start 2 apps in a Javascript client at the point of logon. What's the correct method?
Using your examples as a prototype I have a javascript 'dologin' function which collects username and password form URL parameters (these are generated from a second server on a local network - inaccesible from outside so I'm not worried about any potentail exposure of credentials)
function dologin() {
var login_value = getUrlVars()["u"];
var password_value = getUrlVars()["p"];
var wfapi = WFAPI.getInstance();
wfapi.sendLogin(login_value, password_value, null, onloggedin);
the function 'OnLoggedin' starts the 1st defined application without issue - if I add a second app to that call, then only that second App starts.
function onloggedin(wfapi) {
wfapi.getApps(function (wfapi) {
if (wfapi.Applications[0])
wfapi.Applications[0].run(WFAPI.Application.RUN_JAVASCRIPT);
// Adding a second app (it opens fine) - the first app now does not start in the user's browser window
if (wfapi.Applications[1])
wfapi.Applications[1].run(WFAPI.Application.RUN_JAVASCRIPT);
})
}
Thank you