Hi everyone,
Just wondering if anyone could help me out with a basic question. So I have an embedded workbook in a sharepoint webpart and I am trying to have the workbook size dynamically with the size of the browser.
I did read this HOW TO: Resize Viz on Window Resize (Javascript API)
But not entirely sure where this code goes. This is my embed code :
<script type='text/javascript' src='/javascripts/api/viz_v1.js'></script>
<div class='tableauPlaceholder' style='width: 1480px; height: 720px;'><object class='tableauViz' width='1480' height='720' style='display:none;'><param name='host_url' value='https%3A%2F%%2F' /> <param name='site_root' value='/t/NGE' /><param name='name' value='NGEFermBatches/BatchCompare' /><param name='tabs' value='yes' /><param name='toolbar' value='yes' /></object></div>
Where would I put this code:
window.addEventListener('resize', resizeViz);
function resizeViz() {
var width = document.getElementById(div).clientWidth;
var height = document.getElementById(div).clientHeight;
viz.setFrameSize(width, height);
}
Also what is my client div tag and is the viz object tableauViz?
Thank you all in advance.
Hey L L,
I moved this post to our The specified item was not found. where it's more likely to receive a response.
Thanks,
-Diego
Become a Viz Whiz on the Forums! Support the Community and master Tableau.