title: Dynamically change smarty include file using Javascript
body: <p>I have two tabs in my smarty file. In tab1 I have a dropdown menu it contains list of cities. I have list of templates based on city it contains details about the city. in Second tab i should show the relevant city template based on the dropdown selection.</p>
  
  <p>For example:
  Dropdown:</p>
  
  <pre><code>&lt;select name='city' id='city' class="medium" style="float:left" onchange="setCityTpl(this);"&gt;
  &lt;option value=''&gt;&lt;/option&gt;
  {html_options options=$city_filter selected=$city.name}
  &lt;/select&gt;
  </code></pre>
  
  <p>If I select City 1 in dropdown menu</p>
  
  <p>I should set the tpl name in the smarty include file as city1.tpl</p>
  
  <pre><code>&lt;div id="tab2" class="tab-content" style="display: none; visibility: hidden; padding-top:0px"&gt;
  {include file=city1.tpl}
  &lt;/div&gt;
  </code></pre>
  
  <p>if I select City 2 in dropdown menu</p>
  
  <p>I should set the tpl name in the smarty include file as city2.tpl</p>
  
  <pre><code>&lt;div id="tab2" class="tab-content" style="display: none; visibility: hidden; padding-top:0px"&gt;
  {include file=city2.tpl}
  &lt;/div&gt;
  </code></pre>