title: Setting Struts2 Multiselect dropdown value using jquery
body: <p>I have an requirement in my project where i am getting array of comma separated values from ajax,
  what i need to do is to show dropdown entries selected by setting options value from array to multiselect.
  my jquery code is as follows,</p>
  
  <pre><code>$.ajax({   
                  type: 'POST',
                  url: 'getInputAction',
                  data: {'doc_id': doc_id,'dcr_id':dcrId},
                  success: function(response) {
                      var input = $.trim(response);
                      var prim = input.split("#")[0];
                      var sec = input.split("#")[1];
                      var PrimVals = prim.split("@");
                      var secVals = sec.split("@");
  </code></pre>
  
  <blockquote>
    <p>$("#SEC1@1").val(secVals);</p>
  </blockquote>
  
  <pre><code>                    $.each(PrimVals, function(i,e){
                          $("#PRIM1@1").find("option[value="+e+"]").prop("selected","selected");
                      }); 
                  }
  }); 
  </code></pre>
  
  <p>and Jsp code</p>
  
  <pre><code>&lt;td&gt;
      &lt;s:select theme="simple"  tabindex="8" id="PRI1@1" cssClass="mediumSelect" cssStyle="width:50%;" list="prodList" name="DETAILED1" multiple="true" required="true" /&gt;
  &lt;/td&gt;
  </code></pre>
  
  <p>Above highlighted code is not working .
  Please can anybody help me ,
  Thanks</p>