0

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.
Regards
Omesa

4
Contributors
5
Replies
6
Views
11 Years
Discussion Span
Last Post by Dani
0

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.

0

Oops, forgot the trailing:

%>

OOPS AGAIN!!!

I use ASP at work. Should be trailing:

?>

:eek:

0

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.

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.