title: Why does my code break when I change the URL in the Tableau sample to another URL?
body: <p>Why does my code break when I change the URL in the Tableau sample from
  <a href="https://help.tableau.com/current/api/js_api/en-us/JavaScriptAPI/js_api_sample_basic_embed.htm" rel="nofollow noreferrer">https://help.tableau.com/current/api/js_api/en-us/JavaScriptAPI/js_api_sample_basic_embed.htm</a>
  to the below URL?
  <a href="https://public.tableau.com/profile/david.walls2745#!/vizhome/OlderWorkers_15998328862500/Dashboard1" rel="nofollow noreferrer">https://public.tableau.com/profile/david.walls2745#!/vizhome/OlderWorkers_15998328862500/Dashboard1</a></p>
  <p>ie. this works:</p>
  <pre><code>  ```
  &lt;!DOCTYPE html&gt;
  &lt;html&gt;
  &lt;head&gt;
   &lt;title&gt;Basic Embed&lt;/title&gt;
   &lt;script type=&quot;text/javascript&quot;
          src=&quot;https://public.tableau.com/javascripts/api/tableau-2.min.js&quot;&gt;&lt;/script&gt;
   &lt;script type=&quot;text/javascript&quot;&gt;    
   function initViz(){var containerDiv = document.getElementById(&quot;vizContainer&quot;),
   url = &quot;http://public.tableau.com/views/RegionalSampleWorkbook/Storms&quot;,
   options = {hideTabs: true, onFirstInteractive: function(){console.log(&quot;Run this code when the
   viz has finished loading.&quot;); } }; var viz = new tableau.Viz(containerDiv, url, options);}
   &lt;/script&gt;
  &lt;/head&gt;
  &lt;body onload=&quot;initViz();&quot;&gt;
      &lt;div id=&quot;vizContainer&quot; style=&quot;width:800px; height:700px;&quot;&gt;&lt;/div&gt;
  &lt;/body&gt;
  &lt;/html&gt;
    ```
  </code></pre>
  <p>and this doesn't:</p>
  <pre><code>  ```
  &lt;!DOCTYPE html&gt;
  &lt;html&gt;
  &lt;head&gt;
    &lt;title&gt;Basic Embed&lt;/title&gt;
    &lt;script type=&quot;text/javascript&quot;
          src=&quot;https://public.tableau.com/javascripts/api/tableau-2.min.js&quot;&gt;&lt;/script&gt;
    &lt;script type=&quot;text/javascript&quot;&gt;
    function initViz() {var containerDiv = document.getElementById(&quot;vizContainer&quot;),
    url =&quot;https://public.tableau.com/profile/david.walls2745#!/vizhome/OlderWorkers_15998328862500/Dashboard1&quot;,
    options = { hideTabs: true, onFirstInteractive:function(){console.log(&quot;Run this code when 
    the viz has finished loading.&quot;); } };var viz = new tableau.Viz(containerDiv, url, options);}
    &lt;/script&gt;
  &lt;/head&gt;
  &lt;body onload=&quot;initViz();&quot;&gt;
      &lt;div id=&quot;vizContainer&quot; style=&quot;width:800px; height:700px;&quot;&gt;&lt;/div&gt;
  &lt;/body&gt;
  &lt;/html&gt;
    ``` 
  </code></pre>