1 2 3 4 Previous Next 58 Replies Latest reply on Nov 17, 2017 8:30 AM by Bill Lyons Branched to a new discussion.

    Auto Refreshing Live connected dashboard in Browser(through server)

    Ranadheer Kovvuri

      I have a requirement,where i need to Auto refresh the dashboard very frequently(say 20 seconds).The connection is live  and the link from the server is hosted in a browser.I made some research about using Java API to refresh the data but none of the Java scripts yielded me positive result.

      Here is a java script i tried to refresh the server,dashboard is loading in the browser but its doesnt refresh .Please look into the script and let me know where i went wrong.

       

       

      <html>

      <head></head>

      <body>

      <script type="text/javascript" src="http://servername/javascripts/api/viz_v1.js"></script>

      <object class="tableauViz" width="1920" height="1080" style="display:none;">

        <param name="host_url" value="http://servername/t/311/views/Mayorscreenv5/MayorScreenv2?:embed=y&:display_count=no#3" />

        <param name="site_root" value="/t/311/views/" />

                <param name="name" value="Mayorscreenv5/MayorScreenv2?:embed=y&:display_count=no#3" />

        <param name="tabs" value="yes" />

        <param name="toolbar" value="yes" />

      </object>

      <form>

      </form>

      <script type="text/javascript">

              function useVizAPI() {

                    var viz = window.tableau.vizs[0];

                    viz.hide();

                    viz.show();

                    viz.refresh();

                    //viz.revert();

                    //viz.filter({Product: ['Mint', 'Green Tea']});

               }

               if (document.addEventListener) {

                       window.addEventListener("load", useVizAPI, false);

               } else if (document.attachEvent) {

                       window.attachEvent("onload", useVizAPI);

               }

       

       

      setInterval( useVizAPI, 30000);

       

       

      </script>

      </body>

      </html>

       

       

       

      Thanks

      Rana

        1 2 3 4 Previous Next