I am trying to cause a div (which contains a table) to hide based on a users selection from a dropdown. It works fine in FireFox and Opera, but IE, Safari, and Chrome do not work. Any suggestions?
<style>
.hidden { display: none; }
.unhidden { display: block; }
</style>
<script type="text/javascript">
function hideDiv(divID) {
var item = document.getElementById(divID);
item.className='hidden';
}
function showDiv(divID) {
var item = document.getElementById(divID);
item.className='unhidden';
}
</script>
<select name="addressHomeSameAsMailing" style="width:320px; height:25px;">
<option>Please Select One</option>
<option value="Y" onClick="hideDiv('hideAddress')" <?php if( $_POST['addressHomeSameAsMailing'] == 'Y' ) echo " selected "; ?> >Yes</option>
<option value="N" onClick="showDiv('hideAddress')" <?php if( $_POST['addressHomeSameAsMailing'] == 'N' ) echo " selected "; ?> >No</option>
</select>