This might not work in IE, as IE doesn't return textnodes in childNodes. /Søren
On 07/10/2008, at 21.24, Hector Virgen wrote: > Thanks! That should do the trick :) > > On Tue, Oct 7, 2008 at 12:12 PM, Justin Perkins <[EMAIL PROTECTED] > > wrote: > > I think you will need to use the native methods to get the text nodes > as Prototype filters them out. This will work though: > > $A( $('some-element-id').childNodes ).select( function(element){ > return element.nodeType == 3; } ) > > Or better yet: > > Element.addMethods({ > textNodes: function(element){ > return $A(element.childNodes).select( function(child){ return > child.nodeType == 3; } ); > } > }); > > Then you can just do: $('some-element-id').textNodes(); > > -justin > > > > > > --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Prototype & script.aculo.us" group. To post to this group, send email to prototype-scriptaculous@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/prototype-scriptaculous?hl=en -~----------~----~----~----~------~----~------~--~---