PDA

View Full Version : javascript cascading menu



tonyw
08 May 2006, 09:03 AM
hello!

can anyone recommend an off the shelf javascript menu like these -

http://www.xara.com/products/menumaker/

but which can be driven by php/mysql; as in the menu forms according to a database.

I'd love to write one, but time presses :)

thanks!
tony

Rincewind
08 May 2006, 10:53 AM
It's not actully that hard to write these sorts of menus. Course the code that xara produces has to handle every posible type of site so it's rather large and complex. But if you make your own menu your code can be quite simple.

I'd use css to do the menu these days rather than javascript. Have a look at the tutorial on http://www.alistapart.com/articles/dropdowns/

You should be able to work your php in to just make a for or while loop to write extra <li> elements into the menu so it will adapt to your database.