title: How to refresh a select menu in JQUERY MOBILE
body: <p>I'm creating a web form using JQuery.</p>
  
  <p>I want to copy previous select fields into another select field using a link. i have it changing the DOM, the value of select1.selectedIndex is changed. however it still visually displays the old value. apparently you need to refresh it so it visually updates. I don't understand the syntax of the refresh method i keep reading around. This is how I tried to do it and it doesn't work.</p>
  
  <p>this is the html for the link</p>
  
  <pre><code>    &lt;select name="entry.14.single" id="entry_14"&gt;      
        &lt;option value="1"&gt;&lt;/option&gt;      
        &lt;option value="2"&gt;2&lt;/option&gt;       
        &lt;option value="3"&gt;3&lt;/option&gt;       
        &lt;option value="4"&gt;4&lt;/option&gt;       
        &lt;option value="5"&gt;5&lt;/option&gt;&lt;/select&gt; 
      &lt;select name="entry.16.single" id="entry_16"&gt;      
        &lt;option value=1""&gt;&lt;/option&gt;      
        &lt;option value="2"&gt;2&lt;/option&gt;      
        &lt;option value="3"&gt;3&lt;/option&gt;       
        &lt;option value="4"&gt;4&lt;/option&gt;       
        &lt;option value="5"&gt;5&lt;/option&gt;&lt;/select&gt; 
      &lt;a href="#" onclick="setSelect('entry_16', 'entry_14');return false;"&gt;Same as above&lt;/a&gt;
  </code></pre>
  
  <p>here is my javascript:</p>
  
  <pre><code>    function setSelect(id1, id2){
        var select1 = document.getElementById(id1); 
        var select2 = document.getElementById(id2); 
        select1.selectedIndex = select2.selectedIndex;
        $('#select1').selectmenu('refresh');
      } 
  </code></pre>
  
  <p>can someone please tell me why my refresh statement is not working?</p>
  
  <p>p.s. i know there are other threads on the same issue, i have also read the 'documentation.' please dont link me somewhere else. I have read other sources and its not getting me anywhere. Please just show me what to change in order to get the refresh working properly.</p>
  
  <p>EDIT: heres a jsfiddle you can mess around on
  <a href="http://jsfiddle.net/AFzqt/7/" rel="nofollow">http://jsfiddle.net/AFzqt/7/</a></p>