Shery wrote:
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.