Hello. I am trying to insert OLAP-client (pivot4j) into iframe on web-page. Here's the code:
But when you open the page there is a form for authorization. How to automatically log in? In tomcat CORS is enabled.
Code:
<iframe id="MyIFrame" width="100%" height="100%"></iframe>
<script type="text/javascript">
var iframeURL = 'http://site.ru/pentaho/plugin/pivot4j/faces/index.xhtml';
var iframeID = 'MyIFrame';
function loadIframe(){
var req = new XMLHttpRequest();
req.open("POST", "http://site.ru/pentaho/Login", true, "admin", "password");
req.send(null);
var iFrameWin = document.getElementById(this.iframeID);
iFrameWin.src = this.iframeURL;
}
loadIframe();
</script>
But when you open the page there is a form for authorization. How to automatically log in? In tomcat CORS is enabled.