[thelist] dom question [solved]

Christian Heilmann lists at onlinetools.org
Thu Mar 3 15:50:26 CST 2005


Tom Dell'Aringa wrote:

>Bah, figures I solve it 2 minutes later. 
>
>var text = choice.childNodes[0].nodeValue;
>
>Thank you, FireFox DOM inspector! :)
>  
>
Alternatively  firstChild.nodeValue. The only problem is when  the link 
has extra elements in the text like spans, then it can be a nightmare to 
get, unless you use innerHTML, which is not valid DOM, but supported by 
all modern browsers.




More information about the thelist mailing list