Your code didn't work in FireFox allright and neither in IE
My example works in both IE and FireFox. All these variables
in function onLoad() were introduced so I could see in FireBug
what was happening at each seperate step. Here we go:
<html>
<head/>
<body onload="onLoad();">
<table id="tbl">
<tbody>
<tr>
<td><span>1. Cell</span><td/>
<td><span>2. Cell</span><td/>
<td><span>3. Cell</span><td/>
<td><span>4. Cell</span><td/>
</tr>
</tbody>
</table>
<script type="text/javascript">
function onLoad()
{
var table = document.getElementById("tbl")
var rows = table.tBodies[0].rows;
var row = rows[0];
var cells = row.cells;
var cell = cells[0];
var children = cell.children;
var child = children[0];
alert(child.innerHTML);
}
</script>
</body>
</html>
If you're developing for FireFox please consider using FireBug that is a real
life saver! :-D
Cheers,
Manfred