title: populating data in combo box
body: <p>Please be easy with me, I am trying to solve but could not hence asking for help. I have 2 combo boxes named as first combo box and second combo box in auto.jsp.</p>
  
  <p>I am getting value in a div in auto.jsp by onchange event of first combo box, but the value, i am getting is not populating in the second combo box rather it is being displayed like plain text inside the <code>id combo2</code>. How to populate this data with in that second combo box. I tried a lot but could not do it , any ideas please?</p>
  
  <h2><strong>auto.jsp</strong></h2>
  
  <pre><code>&lt;script type="text/javascript"&gt;
      $(document).ready(function() {
          $("#combo1").change(function() {
              $.get('combo.jsp', { combo1Val : $(this).val() }, function(responseData) {
                  $("#combo2").replaceWith(responseData);
              });
          });
      });          
  &lt;/script&gt;
  
  &lt;body&gt;
      &lt;select id="combo1" name="combo1Val"&gt;// After onchange event of this combo box, second box is disappeared and i am getting value 1, how can i display this one inside the option value of second combo box?
          &lt;option value=""&gt;select&lt;/option&gt;
          &lt;option value="1"&gt;One&lt;/option&gt;//
      &lt;/select&gt;
  
      &lt;select id="combo2" name="combo2"&gt;
          &lt;option value=""&gt;select&lt;/option&gt;
          &lt;option value="2"&gt;Two&lt;/option&gt;
      &lt;/select&gt;
  &lt;/body&gt;
  </code></pre>
  
  <h2><strong>combo.jsp</strong></h2>
  
  <pre><code>&lt;% 
      String combo1Val=request.getParameter("comboVal");
      out.println(combo1Val);// displaying value 1 in auto.jsp in id combo2
  %&gt;
  </code></pre>
  
  <p>Any ideas please?</p>