I'm trying to hide a div using the following code, however the items within the div are not disappearing. I know the logic of the javascript is working. I don't get any errors. Can anyone tell me what's wrong? Thanks!
Javascript:
HTML:
Javascript:
Code:
function OnChange(dropdown)
{
var myindex = dropdown.selectedIndex;
var SelValue = dropdown.options[myindex].value;
if (SelValue == "4" || SelValue == "12")
{
alert("here");
document.getElementById('PanelPharm').style.visibility = 'visible';
}
else
{
alert("here2");
document.getElementById('PanelPharm').style.visibility = 'hidden';
}
}
HTML:
Code:
<div id="PanelPharm">
<tr>
<td>
Pharm</td>
<td>
<select name="PharmChosen" id="PharmChosen">
</select></td>
</tr>
</div>