Sunday, May 12, 2024
 Popular · Latest · Hot · Upcoming
110
rated 0 times [  112] [ 2]  / answers: 1 / hits: 17316  / 11 Years ago, sat, january 11, 2014, 12:00:00

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



<html>
<head>
<script type='text/javascript' src='http://localhost:85/javascripts/api/viz_v1.js'></script>
<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);
}
</script>
</head>

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

<div class id =tableauViz></div>
</body>
</html>


I get this error:



Enter


More From » tableau-api

 Answers
20

I don't have my laptop to hand to confirm which script should be used on a local Tableau Server installation, but try the Tableau Public script (as per the JavaScript API Tutorial) and see if there's any change:



<script type=text/javascript src=http://public.tableausoftware.com/javascripts/api/tableau_v8.js></script>  


Having now checked my own local Tableau Server installation, the script you need is this one:



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

[#73235] Friday, January 10, 2014, 11 Years  [reply] [flag answer]
Only authorized users can answer the question. Please sign in first, or register a free account.
halie

Total Points: 362
Total Questions: 99
Total Answers: 119

Location: Samoa
Member since Mon, Nov 8, 2021
3 Years ago
;