Had another thought about this. If you are building a js menu just to show the objects underneath a parent then it will be quite simple. A fetch, list, will do.
If you are building a complex tree menu you may have to do all of the hard work like searching all nodes before building the js. The Js will not be able to invoke any php after it has been built, and when you rollover something it will have to rely on variables and values that it currently has. So you will need to build everything, then pass it across to the javascript.
This will be slow at the start but if cached it will be fine.
You could use some of the code from existing treemenus to build the tree for you. All you then need to do is write the javascript to display this information.
Wendy, do you have a navigation script in mind already? If so it might help for you to post more info about it, so we can provide specific recommendations. I have built an extensive rollover nav menu based on the treemenu code and some code from TwinHelix (www.twinhelix.com/). I haven't had a chance to post the code as the actual code I have produced is rather ugly.
The more specific information you provide, the easier it is for us to help you.
Alex
Alex
[ bald_technologist on the IRC channel (irc.freenode.net): #eZpublish ]