sample: getting table element in table
by sii_side
HTML
<table id="a">
<tr>
<td>
<table id="b"></table>
</td>
<td>
<table id="c"></table>
</td>
</tr>
</table>
JavaScript
var b = document.getElementById("b");
window.alert("ID ob b: " + b.id);
var c = document.getElementById("c");
window.alert("ID of c: " + c.id);