hello. i have a <tablewith each cell having its own unique ID (see
below). What i want to do is change the CLASS attribute for the SPAN
in one of the cells. i'm currently testing this in IE 6. In my
javascript, i wrote
document.getElementById('0_1').getElementsByTagNam e("span")[0].setAttribute("className",
"hasEvents");
However, i get the following error message:
'document.getElementById(...).getElementsByTagName (...).0' is null or
not an object.
Can someone please help? thanks
HTML code:
<table>
<tr>
<td id="0_0"><span class="noEvents">1</span></td>
<td id="0_1"><span class="noEvents">2</span></td>
<td id="0_2"><span class="noEvents">3</span></td>
</tr>
</table>