Hi
I have a table with a row and many columns declared. Each colum has an img tag and a span tag. On clicking the row, i call a JS and i am trying to access the img element under it by using the firstChild. Will it return the img tag?
Here is the part of my html page and the JS.
....
<table border=0 cellpadding=6 cellspacing=1 width=100%>
<tr valign=top>
<td style='padding-top:6px;padding-bottom:6px;' border=0 width=100% onmouseover=this.style.cursor='hand'; onmouseout=this.style.cursor='auto'; onclick=determineTreeAction(this,'NODE_0_0_')>
<img alt='Expand/Collapse' src='/image/false.gif'>
<span title='' class=UnselSuper>Cross Border Reports</span>
</td>
</tr>
</table>
....
here is the determineTreeAction javascript.
determineTreeAction(this, item)
{
....
this.firstChild.src = '/image/true.gif';
....
rest of the code.
}
however, i am not able to change the source of the image. So the question is will this.firstChild get the imng tag under the column? r do i need to use anythign else to access the img tag under the column?
I am little new to
Java Scritping. so any suggestions would be appreciated.
Thanks