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