Traversing through DOM, identifying td's and manipulating

"Maninder, Singh" <[email protected]> Wed, 1 Mar 2006 21:53:41 +0530
Newsgroups gmane.comp.web.dom.wdf
Message-ID <4D8B620F4FDA414982B23A3E7F6A8EF11AAD9B9C@hydmail01.hyd.corp.int.untd.com>
Hi Everyone,

Just want to take some expert opinion on the following problem.

I have around 5-10 rows like mentioned below.

Each of them have the same bg color except the one that would be active.

So, what I want to do is that when a particular header is clicked, I want to change the bgcolor's of the 2 td's and flip the src of the img in the first td.

What would be the best way to do this as I want to traverse through the tree, change the bgcolors and image of the one being clicked, but also change the image&bgcolors of all the rest to make sure they are not highlighted.

Help would be appreciated.

Thank you,
Mandy.

<ACTIVE>

<tr>
  <td bgcolor="#ffffff"><a href='#)'><img src="foo1_active.gif" border="0" height="25" width="36"></a></td>
  <td bgcolor="#ffffff">&nbsp;<a href='#'><b>Foo1</b></a></td>
</tr>

</ACTIVE>

<tr>
  <td bgcolor="#305daa"><a href='#)'><img src="foo2.gif" border="0" height="25" width="36"></a></td>
  <td bgcolor="#305daa">&nbsp;<a href='#'><b>Foo2</b></a></td>
</tr>


<tr>
  <td bgcolor="#305daa"><a href='#)'><img src="foo3.gif" border="0" height="25" width="36"></a></td>
  <td bgcolor="#305daa">&nbsp;<a href='#'><b>Foo3</b></a></td>
</tr>


Unsubscribe
[email protected]

List info
http://www.quirksmode.org/dom/list.html 
Yahoo! Groups Links

<*> To visit your group on the web, go to:
    http://groups.yahoo.com/group/wdf-dom/

<*> To unsubscribe from this group, send an email to:
    [email protected]

<*> Your use of Yahoo! Groups is subject to:
    http://docs.yahoo.com/info/terms/