JSFiddle - React, Tailwind, and code Playground
HTML
<html>
<HEAD>
<form name="FormyForm">
Welcome.
</form>
<body>
<script type="text/javascript" src="http://public.tableausoftware.com/javascripts/api/viz_v1.js"></script>
<div class="tableauPlaceholder" id="tableauPlaceholder"
style="visibility:hidden;width:654px; height:1469px;background-image: url('http://localhost:81/Background.gif'); top: 0px; left: 0px; width: 100%; margin-left: 76px;">
<noscript>
<a href="#"><img alt="Analytics, Inc. "
src="http://localhost:81/Background.gif"
style="border: none" /></a>
</noscript>
<object class="tableauViz" width="654" height="1469" style="display:none;">
<param name="host_url" value="http%3A%2F%2Fpublic.tableausoftware.com%2F" />
<param name="site_root" value="" />
<param name="name" value="AnalyticsIncJavaScript/AnalyticsInc" />
<param name="tabs" value="no" />
<param name="toolbar" value="yes" />
<param name="static_image" value="http://localhost:81/Background.gif"/>
<param name="animate_transition" value="yes" />
<param name="display_static_image" value="yes" />
<param name="display_spinner" value="yes" id="display_spinner" />
<param name="display_overlay" value="yes" />
<param name="display_count" value="yes" />
</object>
</div>
</body>
JavaScript
function SetTicketValue (returnedTicket) {
$('#tableauPlaceholder').css("visibility", "visible");
console.log(returnedTicket);
// if this works, there should be no "animated spinner" that displays durinng the rendering of the viz
$('#display_spinner').value = "no";
}
$(document).ready (function()
{
var trustedURL="http://tableau.russellchristopher.org/trusted",
userName = "foo",
serverURL="http://tableau.russellchristopher.org/";
$.post(trustedURL, {username: userName, server: serverURL, client_ip: "", target_site: ""}, function(response){SetTicketValue(response);});
}
);