1 Reply Latest reply on Jul 19, 2017 10:27 AM by Patrick Van Der Hyde

    HTML-Embedded View --> show static logo when connection is dead

    Stefan Zehr

      Hello Tableau Community,


      I use the following javascript code to embed a tableau view on a website. The problem is sometimes when our tableau server is offline or we have some technical problems the website is showing a tableau error.

      I would like the website to show a static image or logo of our company instead. Does anyone has an idea how to implement that via javascript/php? I must admit I am not a web developer, so an easy-to-understand solution would be appreciated.


      Thanks in advance!




      $ch = curl_init();
      curl_setopt($ch,CURLOPT_POSTFIELDS, "username=user,target_site=our_site");
      curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
      $result = curl_exec($ch);
      echo '<script type="text/javascript" src="https://our_tableau_server/javascripts/api/viz_v1.js"></script>
           <object class="tableauViz" style="display:none;width:100%;height:100%">
              <param name="site_root" value="&#47;t&#47;our_site" />
              <param name="name" value="our_dash&#47;our_view" />
              <param name="ticket" value="'.$result.'" />
              <param name="toolbar" value="no" />
              <param name="refresh" value="true" />