var divElement = document.getElementById('viz1497447244443'); var vizElement = divElement.getElementsByTagName('object')[0]; vizElement.style.width='804px';vizElement.style.height='1769px'; var scriptElement = document.createElement('script'); scriptElement.src = 'https://public.tableau.com/javascripts/api/viz_v1.js'; vizElement.parentNode.insertBefore(scriptElement, vizElement);