Mozilla counts whitespace as text nodes.
You've got two ways of dealing with that - you can either strip whitespace out of the list, or you can use getElementsByTagName. The latter would be easier, like this:
(btw - don't use "e" for custom object references - what if you want the event argument later on?)
Be aware that Opera 7.5 in XHTML mode will return "html:ul" rather than simply "ul". You might be able to use node.localName instead, but (iirc - may be wrong) that doesn't work in Opera 7.2. What I do is parse the nodeName manually, using this generic method:
//convert node name for O7 in XHTML mode
It actually removes multiple colons ... because ... a created
element in Opera 7.5 in XHTML mode will come back as "html::ul"
If you go for the whitespace-stripping solution, watch out for mac/ie5 - sometimes HTML structures which are stripped of whitespace become unstable in that browser - you may lose margins, or items may collapse together and overlap. But anyway Alex wrote a method for that - http://www.codingforums.com/showthre...&threadid=7028