Here is the problem:
It's a menu based on an XML document with links.
I get this XML document and apply an XSLT and display stuff using a CSS and JavaScript.
When the user clicks on a top-level link, it changes the selected top-level link color, change the bullet image src and opens other links that were hidden under it. When the user clicks again, it changes the color back, changes the bullet image src back and hides the links below it (collapses). Fine.
But when the user clicks on another top-level link, I want to make sure any open top-level link be collapsed and have the color changed back.
I'm looping through all elements and if the element classname matches, I set the color or hide the layer or change the bullet image src. In Internet Explorer, I do collection = document.all and loop through the collection, works great. What do I do with Netscape?
I don't have an array with all the top-level links because it's whatever comes from the XML. Unless I create that array in the XSLT, which doesn't look like a good idea to me...
Any ideas?
Thanks,
Trillie





Bookmarks