title: Using Javascript to hide and show drop down menu and text field
body: <p>In the following drop-down menu, when a user selects operation No, I want the next drop-down menu displayed </p>
  
  <pre><code>&lt;select id="OperationType" onChange="check(this);"&gt;
   &lt;option value="OpNo"&gt;Operation No&lt;/option&gt;
   &lt;option value="OpEmp"&gt;Employee No&lt;/option&gt;
  &lt;/select&gt;
  
  &lt;select id=OperationNos&gt;
   &lt;option value="1001"&gt;1001&lt;/option&gt;
   &lt;option value="1002"&gt;1002&lt;/option&gt;
  &lt;/select&gt;
  </code></pre>
  
  <p>If the user selects employee no, I want the last drop-down menu to be hidden and the following text field shown up:</p>
  
  <pre><code>&lt;input type='text'&gt;
  </code></pre>
  
  <p>What I did is I put the following script but it doesn't hide neither of the two elements:</p>
  
  <pre><code>function check(elem) {
      document.getElementById('OperationType').disabled = !elem.selectedIndex;
  }
  </code></pre>
  
  <p>It only disabled it. I want it to be invisible.
  Thanks</p>