Advertisement
Guest User

Untitled

a guest
Mar 16th, 2017
184
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
HTML 1.58 KB | None | 0 0
  1. <html>
  2.  
  3. <head>
  4. <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
  5. <link href="http://localhost:9510/tm1web/css/cubeviewer.css"
  6. rel="stylesheet" type="text/css" />
  7. <link href="http://localhost:9510/tm1web/css/websheeter.css"
  8. rel="stylesheet" type="text/css" />
  9. <link href="http://localhost:9510/tm1web/scripts/tm1web/themes/tm1web/tm1web.css"
  10. rel="stylesheet" type="text/css" />
  11. <link href="http://localhost:9510/tm1web/scripts/dijit/themes/claro/claro.css"
  12. rel="stylesheet" type="text/css" />
  13. <link href="http://localhost:9510/tm1web/scripts/dojo/resources/dojo.css"
  14. rel="stylesheet" type="text/css" />
  15. <script type="text/javascript"
  16. src="http://localhost:9510/tm1web/scripts/tm1web/common/DjConfig.js"></script>
  17. <script language="javascript" src="http://localhost:9510/tm1web/scripts/dojo/dojo.js"
  18. type="text/javascript"></script>
  19. </head>
  20. <body>
  21. <body class="claro tm1web">
  22.  
  23. <script type="text/javascript">
  24.  {
  25.    var xhr = new XMLHttpRequest();
  26.  
  27.    xhr.open("POST", "http://localhost:9510/tm1web/dwrx/jsonp/TM1Service/login", true);
  28.  
  29.    
  30.    xhr.setRequestHeader("Content-type", "application/x-www-form-urlencoded");
  31.    xhr.onload = function() {
  32.       var response = JSON.parse(xhr.responseText).reply;
  33.  
  34.       if(response != null) {
  35.          var sessionToken = response.sessionToken;
  36.          console.debug("Session token: " + sessionToken);
  37.       }
  38.       else {
  39.          console.error("Login failed.");
  40.       }
  41.    }
  42.  
  43.    var params = "param0=localhost&param1=EPMNP&param2=service_cognosmon_uk&param3=12345​";
  44.  
  45.    xhr.send(params);
  46. };
  47.  
  48. </script>
  49.  
  50. </body>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement