title: append value into dropdown-list
body: <p>i'm using the source code for multiple selection</p>
  
  <p><a href="http://code.google.com/p/dropdown-check-list/" rel="nofollow">Dropdown check-list</a></p>
  
  <p>Since, the example has been shown for the static values, i have edited as per my requirement, And i was trying to populate the values of the dropdown list using database, which means dynamically populating the values into the dropdown-list. But, i'm failed to do. Please help me. The dropdown list will be populated as per the option selected from the first dropdown</p>
  
  <pre><code>&lt;select id="design" onmouseup="showOfficer()" &gt;
   &lt;option value="A"&gt;A&lt;/option&gt;
   &lt;option value="B"&gt;B&lt;/option&gt;
   &lt;option value="C"&gt;C&lt;/option&gt;
   &lt;option value="D"&gt;D&lt;/option&gt;
   &lt;option value="E"&gt;E&lt;/option&gt;
   &lt;/select&gt;
  
  &lt;select id="officers" class="officers" multiple="multiple"&gt;&lt;div id="show_officer"&gt;&lt;/div&gt;&lt;/select&gt;
  </code></pre>
  
  <p>my <strong>javascript</strong></p>
  
  <pre><code>&lt;script language="javascript" &gt;
  function showOfficer(){
                          document.getElementById("msg4").style.display="block";
                         $.ajax({
                              url: 'getValues.jsp',
                              data: 'design_id='+ $('#design').val(),
                              type: 'post',
                              success: function(msg){document.getElementById("show_officer").innerHTML=msg;
                                  document.getElementById("msg4").style.display="none";
                              }});
                      }
  &lt;/script&gt;
  </code></pre>
  
  <p><strong>getValues.jsp</strong></p>
  
  <pre><code>&lt;%@include file="../dbconfig.jsp" %&gt;&lt;%
  String design=request.getParameter("design_id");
   String buffer="";
   try{
       int count=0;
   ResultSet rs = state.executeQuery("SELECT OFFICER_ID,FIRST_NAME,LAST_NAME FROM OFFICER WHERE STATUS_TYPE='UNASSIGN' AND DESIGN_ID='"+design+"'");//
     while(rs.next()){
     buffer=buffer+"&lt;option value='"+rs.getString(1)+"'&gt;"+rs.getString(2)+" "+rs.getString(1)+"&lt;/option&gt;";
     count++;
     }
   if(count==0)
       {
    buffer=buffer+"&lt;option value='ERROR'&gt;OFFICERS ASSIGNED ALREADY&lt;/option&gt;";
   }
   }
   catch(Exception e){
      buffer=buffer+"&lt;option value='ERROR'&gt;OFFICERS ASSIGNED ALREADY&lt;/option&gt;"+e;
   }
   buffer=buffer+"";
   //out.print(buffer);
   response.getWriter().print(buffer);
   %&gt;
  </code></pre>
  
  <p>Please help me !!</p>