Hello everyone.
I need to put a drop dropdown menu on items(such as a category)that is pulled from a database. I have used php+ mysql to pull the data. Can anyone tell me if I can include javascript so that when the mouse is over tha item and/or category, a drop down list appears. Example I have a Books category,when someone places the mouse over it, a dropdown menu appears eg for cildren books, cook books....
Any help would be greatly appreciated.

I'm kind of new to PHP, but you should be able to use PHP to throw out the javascript.

echo "<script language=\"javascript\">"
echo "javascript code here"
echo "</script>"

I have not tried this, but it should work. Make sure to use the "\" before any quotes or PHP will think thats for him. Can someone correct me if I'm wrong?

Keep in mind that some computers will not have javascript enabled.

Oops, forgot the trailing:


Oops, forgot the trailing:



I use ASP at work. Should be trailing:



While you can build a Javascript powered dropdown there is very little need to. All of the same functionality can be built using standard markup and modern CSS. Google for 'Son of Suckerfish' for examples of scriptless, multilevel dropdown/flyout menus.

Or just view DaniWeb's source code ;) The navigation menu we use here is pure CSS.