Hi. I’m just wondering if anyone can give me any ideas about why the following code would resize the table cell height only on IE5/Mac, making the cell taller than 30px, pushing the entire contents down on the page.
The javascript function place in the head:
function clearChose(theSelect) {
//check if option has been stripped already
if (theSelect.options[0].value == 0) {
if (theSelect.options[theSelect.selectedIndex].value != 0) {
var n2 = theSelect.selectedIndex;
var optLen = theSelect.length;
for (var loop = 0; loop < (optLen-1); loop++) {
theSelect.options[loop].value = theSelect.options[loop+1].value; //strip off the first option value
theSelect.options[loop].text = theSelect.options[loop+1].text;//strip off the first option text
}
theSelect.length-=1; //set to right length
theSelect.selectedIndex=n2-1; //set the selected value
}
}
}
The html code placed in the body:
<tr>
<td style=”height:30px”>
<div align=”right”>Hand:</div>
</td>
<td>
<select name=”Hand” onChange=”clearChose(document.form2.elements[‘Hand’]);”>
<option value=”0″>Choose One</option>
<option value=”Left Hand”>Left Hand</option>
<option value=”Right Hand”>Right Hand</option>
</select>
</td>
</tr>
Any thoughts would be much appreciated.