I wrote a quick and dirty "windows style" start menu for an application the
If you want to learn the concepts check out the code at
Some of it is only relevant to my application but thats easy enough to pick
Each time somehting in my start menu is hovered (if it has a certain
classname) it makes an Ajax Request to my server to get the latest possible
sub menu's for that menu item (you wont need to do this if your application
is static) ..
There is probably a better way to do this but i needed flexability and i had
not written a menu before so i thought i would have a crack at it... It took
about 15 minutes to write so it isn't all that complicated - if you need any
explination please ask.
----- Original Message -----
From: "MEM" <tal...@gmail.com>
Sent: Tuesday, October 27, 2009 9:38 AM
Subject: [Proto-Scripty] resource information - navigation menu
If I search for js menu on google, I get "23523523 free build now menus
But I would like to understand and see, the process involving the creation
of a js menu that needs to be unobtrusive.
For this database menu I need to:
Have a menu that, when the user clicks:
a) show the child elements of that clicked parent.
b) change the URL.
I don't mind about reloading.
The server side part:
1) Construct an array from a query.
2) Build a ul/li List based on that array
3) Print it out to the page.
The client-side part:
4) I suppose I should I give to the li and ul some ids, so that we can show
child elements only when a specific parent is clicked? But we add this ul/li
ids on the server side code, or on the client-side code?
5) Each time the user clicks on a menu item, the URL must change. How to
preserve the menu estates over this url changes?
Some questions may not make too much sense for an experimented look, and are
related with my confusion, but what I really like to understand is the
procedures for creating something like this.
Could I have your help on this?
Thanks a lot,
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 firstname.lastname@example.org
To unsubscribe from this group, send email to
For more options, visit this group at