title: how to get a text box with the value selected in select box
body: <p>This is my view page here i have a select box</p>
  
  <pre><code>&lt;tr&gt;
      &lt;td&gt;Chidren&lt;/td&gt;
      &lt;td&gt;:&lt;/td&gt;
      &lt;td&gt;&lt;select style="font-family: verdana; min-width: 52px;" id="ddlChildren"
               name="ddlChildren"  class="required" onChange="return Check_Adult('dd1Age')" &gt;
              &lt;option value=""&gt;children&lt;/option&gt;
              &lt;option value="1"&gt;1&lt;/option&gt;
              &lt;option value="2"&gt;2&lt;/option&gt;
              &lt;option value="3"&gt;3&lt;/option&gt;
              &lt;option value="4"&gt;4&lt;/option&gt;&lt;/select&gt;
      &lt;/td&gt;
    &lt;/tr&gt;
  </code></pre>
  
  <p>with the value from select box if the value is one then i need to create a text box
  if the value is two then i need to create two ,,, and respectively
  In my Check_Adult javascript function ,,I did this</p>
  
  <pre><code>   function Check_Adult()
  {
      alert('hi');
      var Child= document.getElementById('ddlChildren').value;
      alert(Child);
      if(Child == 1)
      {
         var tbox = document.createElement('input');
         tbox.setAttribute('type', 'text');
         var frm = document.forms[0];
         frm.appendChild(tbox);
         frm.appendChild(tbox2);
  
         var sel = document.createElement('select');
          sel.setAttribute('type', 'text');
         var frm = document.forms[0];
         frm.appendChild(sel);
      }
  }
  </code></pre>
  
  <p>But the text box is not created how to create it?</p>