Recent Questions
Q: My Submenu is faded too quickly if I pull the mouse away from the java drop down menu.
A: You can try to use Deluxe Menu - this is a newer version of DHTMLMenu. You can use the following parameters there:
var smShowPause=200;
var smHidePause=5000;
Q: I’d like to know how to populate the navigation bar menu from a database?
A: Please, see the example of .php file.The content of .php file depends on your database structure.
<?php
// The example for PHP/MySQL.
// MySQL database has the table "menuTable" that contains data for menu items.
// The table has the following fields:
// 1. "text" - item text
// 2. "link" - item link
// 3. "icon1" - item icon (normal state)
// 4. "icon2" - item icon (mouseover state)
function getMenuItems()
{
$jsItems = '';
// Select all records from table "menuTable"
$allItems = mysql_query('SELECT * FROM menuTable;');
// Extract items data from database and build Javascript code for menuItems
while ($itemData=mysql_fetch_array($allItems))
{
$jsItems .= '["'.$itemData['text'].'", "'.$itemData['link'].'", "'.$itemData['icon1'].'", "'.$itemData['icon2'].'"],';
}
// Return Javascript code
return $jsItems;
}
?>
<script>
var menuParam1 = value1;
var menuParam2 = value2;
var menuParam2 = value2;
...
var menuItems = [
// Write Javascript code for menu items
echo getMenuItems();
?>
];
</script>
Q: Is there maybe a way that I can set up the menu so that it does not load at all until someone clicks on, say, a link, such as 'Products' and clicking on that link would then load the java menu buttons onto the page in the desired position?
A: Yes, you can do it.
Delete dm_init(); function from data file and use OnClick event foryour 'Products' link.
<a href="products.html" OnClick="dm_init();">Products</a>
Q: I have started using your menu and when testing in both IE-browsers the CPU jumps to 100% for at least 30 to 60sec.
Then the sub menu appears but also not as fast as in Firefox(no effects).
Now does my menu contains about 1476 item-lines, and I use the cross-frame modus.
Any ideas?
A: It is possible that the loading speed can be lower if the menu is very large. But it doesn't take so much time.
Yes, you can notice some delay in IE, but in over browsers it works better.
Deluxe Menu works fast, but 1500 is a large value.
I tried to create large menus on my machine: P4 3GHz, 512RAM WinXP SP2
It takes:
- 1000 items ~ 10 sec
- 2000 items ~ 40 sec
You can try to use AJAX-like technology.
http://deluxe-menu.com/ajax-technology-menu-sample.html