Recent Questions Css Collapsible Tree
Q: Also I have a problem getting the separator to show in my javascript right click menu. I have individual settings for the main menu items. I then tried to place an after item image, and they will show, though then the mouseover image does not work.
A: To add a separator you should
//--- Separators
var separatorImage=""; //for subitems (top items in vertical javascript right click menu)
var separatorWidth="100%";
var separatorHeight="3px";
var separatorAlignment="right";
var separatorVImage="separator.gif"; //for the top items (subitems items in vertical menu)
var separatorVWidth="100%";
var separatorVHeight="2px";
var separatorPadding="";
You can create separators using menuItems (you can do it in DeluxeTuner, use "Add separator" button), for example:
var menuItems = [
["item 1"],
["-"], // this item is separator
["item 2"],
];
Q: This tiny javascript menu codes (30kb) take about 25 seconds to load in our browsers (internet explorer)
This intranet site serves approx 15 workstations and I named it 'QuickFind'. It is now the slowest to load of any websites, applications, you name it...
So it is bit embarassing ...
Hoping you can help me to resolve this
A: Try to set the following parameters:
var dm_writeAll=0;
var useIFRAME=0;
Q: I need to work it with PHP/MySQL. I have found some information on it in your Support section, but have problems to understand and wonder if you have more information or a working sample of the loading bar with PHP/ MySQL.
A: Info about generating menu (menu items )from a database, please, see:
http://deluxe-menu.com/generate-menu-from-database-xml-php-asp-vb-support.html
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 = [
<?php
// Write Javascript code for menu items
echo getMenuItems();
?>
];
</script>
Q: I'm struggling with one last issue on my navigation. When you have a screen resolution about the same size as the site width, when a sub menu pops up, It displays sometimes to the left of the first drop down menu list rather than the left. Is there a way of changing the way this displays if the screen size is smaller than 800px wide or so.
A: If there is no enough room on the right side of your browser windowdrop down menu list submenus will be shown on the left side.