3 Replies Latest reply on Oct 26, 2016 6:00 AM by Jeff Strauss

    Tableau JS API : This content cannot be displayed in a frame

    Shivraj Rathore

      Hi All,

       

      I want to embeded my tableau dashboard into my .NET application , just to get started ; I have used tableau online solution with the following code 

       

       

      function initViz() {

       

      var containerDiv = document.getElementById("vizContainer"),

       

      "https://dub01.online.tableau.com/#/site/cgntest/views/DoughnutChartEdit2/Sheet12?:iid=3&:embed=y";

       

      var options = {

       

      true,

       

      false,

       

      true,

       

      "150px",

       

      "300px",

       

      function () {

       

      // The viz is now ready and can be safely used.


      var containerDiv = document.getElementById("vizContainer");

       

      var viz = new tableau.Viz(containerDiv,url,options);

       

       

       

      but this gives me an error message "This content cannot be displayed in a frame" , checking on net I found that it could be due to clickjacking or due to the "#" in the url https://dub01.online.tableau.com/#/site/cgntest/views/DoughnutChartEdit2/Sheet12?:iid=3&:embed=y  .

      I cannot disable the clickjacking in the tableau server and as well the url ( with the # symbol) is generate by tableau server so I cannot change it so not sure what I should do ? Any suggestions on how to overcome this ? . Also it works if I publish the sam dashboard in Tableau public

       

      https://public.tableau.com/profile/shivraj7864#!/vizhome/DoughnutChart2/Dashboard4?:embed=y  .

       

      Thanks

      Shivraj