I’m trying to dynamically change the height of a cell than contains a div. Now i can change the height of the div, just fine, but when I try the cell, it just doesn’t work, yet I get no errors. Any Ideas on why this doesn’t work?
if( df0.checkbox1.checked)
{
document.getElementById('layerOne').style.visibility = 'visible';
document.getElementById('layerOne').style.height = 125;
document.getElementById('eftcell').height = '125px'
}
else
{
document.getElementById('layerOne').style.visibility = 'hidden';
document.getElementById('layerOne').style.height = 1;
document.getElementById('eftcell').height = '1px'
}
I did a bit of testing in FireFox 4 (via Firebug), it seems to work for me. Here are some things to look for:
125for height, rather than the string'125px'id="eftcell"is the<td>element, not its parent<tr>heightattribute on<td>?