[thelist] a good DOM menu javascript?

Zhang Weiwu zhangweiwu at realss.com
Thu Nov 24 02:43:16 CST 2005


Hello. I have been testing around looking for a good javascript menu system
to be used in my web application. So far I didn't find a satisfying one, and
I think that's becaues I didn't search hard enough.

Most of the famous javascript menu system I don't like because they mean to
support IE 5 (and a lot of them mean to support IE 4). My webapp base
compatibility line is IE 6. These scripts, being said to force to support IE
4/5, do not use DOM style for generating menu, rather instead, use a
configure file (usually in .js format).

E.g. they work in this way:

menu_items.js : var MENU_A = ['menu title', 'menu style', 'menu link'....

But I do like things in this DOM way:

menu_items.shtml:
<ul>
<li id="menuitem"><a href="xxx">..</a></li>
...
</ul>

the reason I prefer DOM way is because the webapp's menu is generated
dynamicly, unless it's DOM based, I will be forced to write php script that
generates js config script (that generates HTML for the menu) and making it
very difficult to debug and track. If there is an ajax menu I would prefer
that even more because some menus even require on-the-fly generation (e.g.
a list of all current users, the page cannot be too slow when there happen
to be 200 users online). And I don't need the damn stupid base support of IE
4. Every user are using Fx (because this is an in-company webapp, and
as the administrator I can easily change all staff to be Fx users, and
I already have done so). It simply needs to be Fx compatible.

Extra features I need is:
* no-limit cascating level (menus are 3 or 4 levels deep);
* no need for fancy decoration (make no mistake: this /is/ a feature), just
need to be fast (this means if the js menu is poped up using <select> then
it's still okay)
* submenu itself clickable (some menus only allow menu items to be
clickable)
* allows a lot of menu items (e.g. when there are 60 menu items, the user
don't need to buy a 30'inch tall display to be able to select the last one.
Again, simply <select> fits in this case for it's scrolling ability)

Any suggestions? I have been searching for hours!



More information about the thelist mailing list