3 Replies Latest reply on Feb 4, 2015 4:39 PM by Russell Christopher

    Detect if viz is interactive

    Meet Idnani



      I am using the Javascript implementation to embed my reports into my webpage and do not use trusted authentication. The portal only requires the user to login directly to the tableau server whenever the session expires.

      So basically I embed a report into my page using


      vizReports = new tableauSoftware.Viz(placeholderDiv, url, options);


      If session has expired Tableau displays the default login screen & upon sign in the desired report is displayed & if session is valid the report is directly displayed.


      Now my question starts here


      I want to perform some specific action once the report is available , more like show a “Loading Image” while report is processing & hide the “Loading Image” once report is loaded. I can do this successfully in the onFirstInteractive() function as below


      function populateReport() {
          var url = "http://myurl;
      /** Show the loading image */
          var options = {
                 width : '1150px',
                 height : '2000px',
                 hideTabs : true,
                 hideToolbar : true,
                 onFirstInteractive : function() {
                      /** Hide the loading image */
      vizReports = new tableauSoftware.Viz(placeholderDiv, url, options);
          } catch(e) {
      console.log("Exception: "+e);

      But the problem I am facing here is that onFirstInteractive() is not called in the case when the login form is displayed. It is only called when the actual report is available.

      Is there a way in which I can detect whether this function is called or not or maybe check if the viz is interactive or not?


      I read somewhere about the Viz Property isInteractive, but it doesnt really seem to work, looks like it has been decommissioned since v8.


      Looking forwards to a quick response