title: Get & set drop down value using jQuery
body: <p>If user select an option from dropdown it will shown it a textbox but if he select option having value "Other" then a row will appear to type value for other.</p>
  
  <p>my code works fine except when option value is not equal to "Other"</p>
  
  <pre><code>&lt;script type="text/javascript"&gt;&lt;!--
  function setAndReset(box) {
  if(box.value == 'Other'){
      $("#ShowHide").hide();
  }
  document.FormName.hiddenInput.value = box.value;
  
  }
  //--&gt;
  &lt;/script&gt;
  
  &lt;body bgcolor="#ffffff"&gt;
  &lt;form id="FormName" action="" method="get" name="FormName"&gt;
      &lt;select name="choice1" size="1" onchange="setAndReset(this);"&gt;
      &lt;option value="one"&gt;first&lt;/option&gt;
      &lt;option value="two"&gt;second&lt;/option&gt;
      &lt;option value="three"&gt;third&lt;/option&gt;
      &lt;option value="other"&gt;Other&lt;/option&gt;
      &lt;/select&gt;
  
      &lt;input type="text" name="hiddenInput" value=""&gt;
      &lt;tablt&gt;&lt;tr id="ShowHide"&gt;&lt;td&gt;
          &lt;input type="text" name="otherInput"&gt;
      &lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;
      &lt;input type="submit" name="submitButtonName"&gt;
  &lt;/form&gt;
  &lt;/body&gt;
  </code></pre>
  
  <p>but it does not show/hide  &amp; does not set value in textbox.</p>
  
  <p>If it's solve using jquery then i will be thankful to you for you code.</p>
  
  <p>Thanks.</p>