[Javascript] Walking the DOM

Peter Brunone peter at brunone.com
Fri Sep 8 14:49:10 CDT 2006


		Wouldn't that just be o.childNodes[0].innerHTML ?

Of course I may have misunderstood the question...

				From: Terry Riegel riegel at clearimageonline.com

If I have the following markup...

My Favorite 
Photos (58)

and... in my javascript I have...

o=document.getElementById('album01');

How do I reference (with the intent of changing) the content of the 
anchor? My goal is to replace the text with an updated number from 
the server, but I need a method to replace the text. As a side 
question should I be using innerHTML, or is there a better method. If 
anyone is using prototype and knows of a method through that library 
that would be helpful.

Thanks,

Terry
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.evolt.org/pipermail/javascript/attachments/20060908/9f097419/attachment.htm>


More information about the Javascript mailing list