Thanks
This:
var name_cell = document.getElementById(draw + "_name");
var anchorAry = name_cell.getElementsByTagName('A');
Combined with:
anchorAry[0].style.color = "#FFFFFF";
Is just what I wanted. I just really did not want to write a loop for this
simple case to handle the way different browsers create childNode arrays.
--------------
Ian Skinner
Web Programmer
BloodSource
www.BloodSource.org
Sacramento, CA
"C code. C code run. Run code run. Please!"
- Cynthia Dunning
....-----Original Message-----
....From: Rob [mailto:[EMAIL PROTECTED]
....Sent: Monday, April 18, 2005 9:45 AM
....To: CF-Talk
....Subject: Re: OT JavaScript [not Macromedia/Adobe]
....
....I like to try to use the DOM in a w3c manner. Here is a pretty good
....site to see your options
....http://www.quirksmode.org/dom/w3c_core.html
....
....if you mean cross browser to include NS4 though, forget that :)
....
....
....On 4/18/05, Ian Skinner <[EMAIL PROTECTED]> wrote:
....> 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.
....>
....>
....
....
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Discover CFTicket - The leading ColdFusion Help Desk and Trouble
Ticket application
http://www.houseoffusion.com/banners/view.cfm?bannerid=48
Message: http://www.houseoffusion.com/lists.cfm/link=i:4:203324
Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4
Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4
Unsubscribe:
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4
Donations & Support: http://www.houseoffusion.com/tiny.cfm/54