title: Dropdownlist does not retain selected value
body: <p>The value does not retain and it keep go back to 1st value after selection.</p>
  
  <p>This is my jQuery</p>
  
  <pre><code>&lt;script&gt;
      if($("#ddlGender").val("Female")) {
          $('select[name^="ddlGender"] option[value="Female"]').attr("selected","selected");
      } else if($("#ddlGender").val("Male")) {
          $('select[name^="ddlGender"] option[value="Male"]').attr("selected","selected");
      } else {
          $('select[name^="ddlGender"] option[value=""]').attr("selected","selected");
      }   
  &lt;/script&gt;
  </code></pre>
  
  <p>This is my dropdown list</p>
  
  <pre><code>&lt;select name="ddlGender" id="ddlGender" onchange="${remoteFunction(action: 'index', controller: 'Main', params:'\'id=\' + escape(this.value)', update: [success: 'd1', failure: 'ohno'], options: '[asynchronous: false]')}"&gt;
    &lt;option value=""&gt;--Select--&lt;/option&gt;
    &lt;option value="Female"&gt;Female&lt;/option&gt;
    &lt;option value="Male"&gt;Male&lt;/option&gt;
  &lt;/select&gt;
  </code></pre>