JAVASCRIPT   25

cmd js

Guest on 6th August 2022 01:14:58 AM

  1. /****************************************************************
  2. ** Licensed Materials - Property of IBM
  3. **
  4. ** IBM Cognos Products: drill
  5. **
  6. ** (C) Copyright IBM Corp.
  7. **
  8. ** US Government Users Restricted Rights - Use, duplication or
  9. ** disclosure restricted by GSA ADP Schedule Contract with
  10. ** IBM Corp.
  11. *****************************************************************/
  12. // Copyright (C)  Cognos ULC, an IBM Company. All rights reserved.
  13. // Cognos (R) is a trademark of Cognos ULC, (formerly Cognos Incorporated).
  14.  
  15. function metaLogonWindow(parentWin)
  16. {
  17.         var theURL = cfgGet("SCRIPT_ENGINE") + "?b_action=xts.run&m=portal/close.xts";
  18.         var expWnd = window.open(theURL,"LoginWnd","toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=yes,resizable=yes,width=630,height=310");
  19.         cfgSet("expWnd", expWnd);
  20.         cfgSet("winHdl", parentWin);
  21.         setTimeout(mLPWindow, 1000);
  22. }
  23.  
  24. function mLPWindow(){
  25.         var expWnd = cfgGet("expWnd");
  26.         if (expWnd && !expWnd.closed)
  27.                 setTimeout(mLPWindow, 1000);
  28.         else
  29.         {
  30.                 var winHdl = cfgGet("winHdl");
  31.                 if (winHdl && winHdl.location)
  32.                 {
  33.                         // Use the current stored request that happened just before the login.
  34.                         doMetadataRequest(cfgGet("CURRENT_REQUEST"));
  35.                 }
  36.                 cfgRemove("winHdl");
  37.                 cfgRemove("expWnd");
  38.         }
  39. }
  40.  
  41. function metaErrorPage(error)
  42. {
  43.  
  44.         var errmessage = error[1]
  45.         var errdetail = "";
  46.        
  47.         for( i=2; i < error.length; i++)
  48.         {
  49.                 errdetail += error[i].substring((error[i].indexOf(",")) + 1) + '\n';
  50.         }
  51.         document.pform.m.value = prod_dir + "/tree_error.xts";
  52.         document.pform.errorText.value= errmessage.substring((errmessage.indexOf(",")) + 1);
  53.         document.pform.errorDetail.value = errdetail;
  54.         document.pform.ps_nav_op.value = "maintain";
  55.         document.pform.submit();
  56. }

Raw Paste


Login or Register to edit or fork this paste. It's free.