[Javascript] Accessing a nested Anchor element.

Ian Skinner ian.skinner at bloodsource.org
Mon Apr 18 11:49:53 CDT 2005


Assume the following HTML markup.

<td id="G23520050328_name">
	<a href="..." title="..." onClick="...">CalHFA</a>
</td>

In a JS function there is basically this assignment. [This of course is done dynamically but I am simplifying for this question.]

var name_cell = document.getElementById("G23520050328_name");

What I would like to know, what is the simplest yet cross browser compatible method to access the <a>nchor element in the "name_cell" reference in order to set a style property on the anchor?  The color property in my current requirement.  This can hopefully be done with little to no extra HTML since there are hundreds of these cells.

TIA


--------------
Ian Skinner
Web Programmer
BloodSource
www.BloodSource.org
Sacramento, CA
 
"C code. C code run. Run code run. Please!"
- Cynthia Dunning

Confidentiality Notice:  This message including any
attachments is for the sole use of the intended
recipient(s) and may contain confidential and privileged
information. Any unauthorized review, use, disclosure or
distribution is prohibited. If you are not the
intended recipient, please contact the sender and
delete any copies of this message. 





More information about the Javascript mailing list