// Licensed Materials - Property of IBM // // IBM Cognos Products: ps // // (C) Copyright IBM Corp. 2005, 2016 // // US Government Users Restricted Rights - Use, duplication or disclosure restricted by GSA ADP Schedule Contract with IBM Corp. // // cognosLaunch() utility // // Copyright (C) 2008 Cognos ULC, an IBM Company. All rights reserved. // Cognos (R) is a trademark of Cognos ULC, (formerly Cognos Incorporated). // // Usage: cognosLaunch("ui.gateway","", "ui.tool","" [,"","value>"]*) // Example: cognosLaunch("gateway","http://myserver:80/series8/cgi-bin/(cognosgateway)","ui.tool","ReportStudio"); // parameter "ui.gateway" is mandatory. If "gateway" is a null string, the function will assume a relative path. // // // Usage: cognosLaunchInWindow(winName, winProperties, // "ui.gateway","", "ui.tool","" [,"","value>"]*) // Example: cognosLaunch( "mywindow", "height=300,width=400,scrollbars=yes,resizable=yes", // "ui.gateway","http://myserver:80/series8/cgi-bin/(cognosgateway)","ui.tool","ReportStudio"); // // if winName is null, empty or "_blank", a new window will be created with a random name // if no window named winName exists, a new window with that name will be created // if a window named winName already exists, the studio will be loaded into that window. // winProperties is a string containing a list of parameters that control the aspect/behavior of the new window // function cognosLaunch() { var JSINFRAMEPARAM="launch.openJSStudioInFrame"; var jsinframeSpecified = false; var numArgs = arguments.length; var argsOut = new Array(); for(i=0;i]/g,''); } //Convert a relative gateway into an absolute gateway for the created form. NOTE: An absolute gateway is needed so the that created form will properly submit in FireFox. if ((gateway.indexOf("http://") != 0) && (gateway.indexOf("https://") != 0)) { gateway = location.protocol + "//" + hostPort + gateway; } formElement.setAttribute("action", gateway); var hiddenElement = docTarget.createElement("input"); hiddenElement.setAttribute("type","hidden"); hiddenElement.setAttribute("name","b_action"); hiddenElement.setAttribute("value","xts.run"); formElement.appendChild(hiddenElement); hiddenElement = docTarget.createElement("input"); hiddenElement.setAttribute("type","hidden"); hiddenElement.setAttribute("name","m"); hiddenElement.setAttribute("value","portal/launch.xts"); formElement.appendChild(hiddenElement); for(i=0;i]/g,''); } //Convert a relative gateway into an absolute gateway for the created form. NOTE: An absolute gateway is needed so the that created form will properly submit in FireFox. if ((gateway.indexOf("http://") != 0) && (gateway.indexOf("https://") != 0)) { gatewayAbsolute = location.protocol + "//" + hostPort + gateway; } formElement.setAttribute("action", gatewayAbsolute); var hiddenElement = ""; if ( uitoolSpecified && uitool === "DashboardConsole") { hiddenElement = docTarget.createElement("input"); hiddenElement.setAttribute("type","hidden"); hiddenElement.setAttribute("name","b_action"); hiddenElement.setAttribute("value","icd"); formElement.appendChild(hiddenElement); hiddenElement = docTarget.createElement("input"); hiddenElement.setAttribute("type","hidden"); hiddenElement.setAttribute("name","pathinfo"); hiddenElement.setAttribute("value","/main"); formElement.appendChild(hiddenElement); if (uiaction === 'edit' ) { var srcURL = gateway + "/icd/feeds/cm/id/" + uiid + "?entry=" hiddenElement = docTarget.createElement("input"); hiddenElement.setAttribute("type","hidden"); hiddenElement.setAttribute("name","src"); hiddenElement.setAttribute("value",srcURL); formElement.appendChild(hiddenElement); } } else alert(ERR_NOSUPPORT); for(i=0;i