title: how to get strut <html:select> multiple value from jsp in java script
body: <p>I am new to javascript and struts.  I have an legacy front end uses jsp, javascript, strut.  Application has a jsp which builds a list which is currently single select.  Now I have a request to change it to multiple select.   I have added multiple option to .   But I am not able get the multiple values selected in my javascript.  Here is the part of the code.  </p>
  
  <pre><code>&lt;html:html&gt;
      &lt;form name="reimport" action = ""/&gt;
          &lt;td&gt;
              &lt;div&gt;
                  &lt;%if("GWSD".equals(request.getSession().getAttribute("Export")))
                  { %&gt;
                      &lt;html:select property="tmI" multiple="true" size="8" value=" " &gt;
                      &lt;%
                      String tmId = "";     
                      String tmName = "";
                      String dmId = "";
                      for (int i = 0; i &lt; tmSize; i++) {
                          TargetTMItemOutBean item = (TargetTMOutBean)outBean.getTmList().get(i);
                          tmId = item.getTMId();
                          boolean isDisabledFound = false;
                          for (int j=0; j &lt; dmSize &amp;&amp; !isDisabledFound; j++) {
                              DisableOutBean dItem = (DisableOutBean)outBean.getDMList().get(j);
                              dmId = dItem.getDMD();
                              if (StringUtils.equals(tmId, dmId)) {
                                  isDisabledFound = true;
                              }
                          }
                          if (!isDisabledFound) {
                              tmName = tmId + " - " + item.getTMName();
                          %&gt;
                          &lt;html:option key="&lt;%=tmId%&gt;" value="&lt;%=tmName%&gt;"/&gt;
                          &lt;%
                          }
                      }     
                      %&gt;
                      &lt;/html:select&gt;&amp;nbsp;   
                  &lt;%}
             %&gt;
             &lt;/div&gt;
          &lt;/td&gt;
      &lt;/form&gt;
  &lt;/html:html&gt;    
  </code></pre>
  
  <p>Java script:</p>
  
  <pre><code>function checkReImport(tabType, cntAtributSelected, premessage, message){
    if(document.reimport.tmI != null){
     var selected = document.reimport.tmI;
     opener.document.RBGetDataInBean.tMI.value=selected;
    }
  </code></pre>
  
  <p>I could select multiple values from list.  But in the java script I get only one. Any help is very much appreciated.</p>