title: Change URL for DIV based on drop down selection
body: <p>I have tried searching for an answer to this but unfortunately I have been unable to find a solution because my question is very specific to the tools I am using.</p>
  
  <p>Long story short - I need to be able to select a URL via a drop down box. Each URL links to a different view of a tableau dashboard. I am using a custom HTML page due to the fact that I need to have the dashboard refresh automatically without manual intervention. I need to have a single page that is re-usable as I will be embedding this into another application at a later time.</p>
  
  <p>For the refresh I am passing the url to the Tableau javascript API and using the API to refresh the div.</p>
  
  <pre><code>&lt;html&gt;
      &lt;head&gt;
      &lt;script type="text/javascript" src="https://data.medcity.net/javascripts/api/tableau-2.0.3.js"&gt;&lt;/script&gt;
      &lt;/head&gt;
      &lt;body&gt;
          &lt;div id="dropdown" style="position:absolute,z-index:2"&gt;
              &lt;select id="dashboard"&gt;
                  &lt;option value="url to dashboard1"&gt;Dashboard 1&lt;/option&gt;
                  &lt;option value="url to dashboard2"&gt;Dashboard 2&lt;/option&gt;
                  &lt;option value="url to dashboard3"&gt;Dashboard 3&lt;/option&gt;
                  &lt;option value="url to dashboard4"&gt;Dashboard 4&lt;/option&gt;
              &lt;/select&gt;
          &lt;/div&gt;
          &lt;div id="rt" style="position:absolute,z-index:1"&gt;
          &lt;div&gt;
          &lt;script type='text/javascript'&gt;
              var placeholder = document.getElementById("rt");
              var url = document.getElementById("dashboard").value;
              var options = {
                  width: "1900px",
                  height: "330px",
                  hideTabs: true,
                  //hideToolbar: true 
              };
              var viz = new tableauSoftware.Viz(placeholder, url, options);
              setInterval(function(){viz.refreshDataAsync()},30000);
          &lt;/script&gt;
      &lt;/body&gt;
  &lt;/html&gt;
  </code></pre>
  
  <p>I need to be able to select an item from the drop down and it automatically pass the URL to the API so that it will load the new page and run the refresh functions.</p>
  
  <p>Any assistance would be greatly appreciated.</p>