Explore Courses Blog Tutorials Interview Questions
0 votes
in BI by (17.6k points)

I'm a beginner trying to embed Tableau visualization into my web page, such that whenever the link is clicked, visualization is rendered on the page. But the browser loads with an error on the tableauSoftware object. How can I initialize this object?

I'm using the Tableau server trial version



        <script type='text/javascript' src='http://localhost:85/javascripts/api/viz_v1.js'></script>


            function initializeViz() {

                var placeholderDiv = document.getElementById("tableauViz");

                var url2 = "http://localhost:85/views/test_page/Sheet1?:embed=y&:display_count=no";

                viz = new tableauSoftware.Viz(placeholderDiv, url2);





        <a href="#" onclick="$('#tableauViz').html(''); initializeViz()">visualize</a>

        <div class id ="tableauViz"></div>



I get this error:

Enter image description here 

1 Answer

0 votes
by (47.2k points)
  • This script should be used on a local Tableau Server installation, but try the Tableau Public script (as per the JavaScript API Tutorial):

<script type="text/javascript" src=""></script>

  • Check the  local Tableau Server installation, by running the following script:

<script type="text/javascript" src="http://localhost:85/javascripts/api/tableau_v8.js"></script>

Browse Categories