title: autofill combobox based on another combo box selection
body: <p>I am autofilling second textbox based on first textbox in auto.jsp, similarly i want to autofill a combobox, how can i do it? that is autofill second combo box based on first combo box selection. 
  ------auto.jsp-------</p>
  
  <pre><code>&lt;script language="javascript" type="text/javascript"&gt;  
      var xmlHttp  
      var xmlHttp
      function showState(str){ 
          if (typeof XMLHttpRequest != "undefined"){
              xmlHttp= new XMLHttpRequest();
          }
          else if (window.ActiveXObject){
              xmlHttp= new ActiveXObject("Microsoft.XMLHTTP");
          }
          if (xmlHttp==null){
              alert ("Browser does not support XMLHTTP Request")
              return
          } 
          var url="state.jsp";
          url += "?count=" +document.getElementById("textbox1").value;//passing first textbox value and displaying in textbox2 ID
          xmlHttp.onreadystatechange = stateChange;
          xmlHttp.open("GET", url, true);
          xmlHttp.send(null);
      }
      function stateChange(){   
          if (xmlHttp.readyState==4 || xmlHttp.readyState=="complete"){   
              document.getElementById("textbox2").value = xmlHttp.responseText;    
          }   
      }   
  &lt;/script&gt;  
   &lt;body&gt;  
   &lt;input id="textbox1" type="text" name="name" onkeyup="showState(this.value)"/&gt; 
  &lt;input id="textbox2" type="text" name="secondVal" /&gt;// here i am displaying first textbox value
  &lt;/body&gt; 
  </code></pre>
  
  <p>--------state.jsp-----------</p>
  
  <pre><code>&lt;%
  String firsttextbox=request.getParameter("count");//Got first textbox value
  out.println(firsttextbox);// setting it in second text box value by document.getElementById("textbox2").value = xmlHttp.responseText; 
  %&gt;
  </code></pre>
  
  <p><strong>Same thing i want to do when a drop down is selected from first combo box, then an event will be fired to state.jsp there by enabling second combo box in auto.jsp, how can i achieve it?</strong></p>
  
  <p>Thanks </p>