<script type="text/javascript"
src="http://<tableau server URL of the view>"></script>
<script type="text/javascript">
function initViz() {
var containerDiv = document.getElementById("vizContainer"),
url = "<Tableau server URL of the view>",
options = {
hideTabs: true,
onFirstInteractive: function () {
console.log("Run this code when the viz has finished loading.");
}
};
var viz = new tableau.Viz(containerDiv , url);
}
It's resolved. Had to do some changes in the tableau server configuration. Disabled clickjacking and it worked.
Thanks everyone, esp @anoop :)
Cheers!
I had the same issue and I fixed it without disabling clickjacking.!
Here is what i did:
If you do not want to disable Clickjacking then,
instead of using the browser url of your tableau view,
use the link (yes! i am talking about a URL not the embed code) provided by tableau server in the SHARE button in your view.
Hope this Helps!