Dynamic menu

S

Shery

Dear All,

How could I make a menu have many sub-menus, note that the
menu and sub-menus items come from database.

Ex: a menu have items like:
Products | Auctions | Orders

the menu items above all come from a table in a DataBase,
and if On Mouse Over or On Click events happens for any
item, the specific submenu for this item appear which is
also come from database.

Do anyone know how could i do this
Thanks alot in advance

Shery
 
P

Philipp Lenssen

Shery said:
How could I make a menu have many sub-menus, note that the
menu and sub-menus items come from database.

Ex: a menu have items like:
Products | Auctions | Orders

the menu items above all come from a table in a DataBase,
and if On Mouse Over or On Click events happens for any
item, the specific submenu for this item appear which is
also come from database.

One approach. You output the data into div's with IDs like:

<div class="navigation" id="navigation1">
<a href="...." onmouseover="show('navigation1_1') ...>Products</a>
<a href="...." onmouseover="show('navigation1_2')>Auctions</a>
</div>

<div class="navigation" id="navigation1_1">
<a href="....">Techotron</a>
<a href="....">Mechomatic</a>
</div>

Then you use DHTML to handle the mouseover, mouseout events. You add a
setTimeout functionality so that menus will be hidden after a while
(after the onmouseout event fires).

You use CSS with absolute positioning to style all this. You might want
to set a { display: block; } and so on.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,756
Messages
2,569,534
Members
45,007
Latest member
OrderFitnessKetoCapsules

Latest Threads

Top