Welcome to Knowage Q&A

Here you can read the Q&A history.

To get new community support please go to GitHub discussions (KnowageLabs/Knowage-Server · Discussions · GitHub).

0 votes
1 view
i tried Sbi.sdk.api to get content inside new popup window by window.open()

the code i refered:

var user = 'biuser';
         var password = 'biuser';
         
        Sbi.sdk.services.setBaseUrl({
            protocol: 'http'     
            , host: 'ip'
            , port: '8080'
            , contextPath: 'knowage'
            , controllerPath: 'servlet/AdapterHTTP'  
        });
        
        
        execTest2 = function() {
            var html = Sbi.sdk.api.getDocumentHtml({
                documentLabel: 'par_document_label'
                , executionRole: '/spagobi/user'
                , parameters: {ELAB_ID: 'ELA_T_ANVOPOD_1', TIPO_AN_ID: 'ANVOFATT'}
                , displayToolbar: true
                , canResetParameters: false
                , iframe: {
                    height: '500px'
                    , width: '100%'
                    , style: 'border: 0px;'
                }
            });
            document.getElementById('targetDiv').innerHTML = html;
        };
      
            /*
            * the callback invoked uppon request termination
            *
            * @param result the server response
            * @param args parameters sent to the server with the original request
            * @param seccess true if the service has been executed by the server in a succesfull way
            */
            var cb = function(result, args, success) {
                
                if(success === true) {
                    execTest2();
                } else {
                    alert('ERROR: Wrong username or password');
                }
            };

            

                    doLoginAndExecute = function() {

                        Sbi.sdk.api.authenticate({
                            params : {
                                user : user,
                                password : password
                            }

                            ,
                            callback : {
                                fn : cb,
                                scope : this
                            }
                        });
                    };
Environment knowage 8.0.1, google chrome
in API and SDK by (240 points)

Please log in or register to answer this question.

...