Recent Questions Scripts Treeview
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: I'm looking at purchasing your deluxe menu software.
Could you advise how to create pull down menus or if it's possible?
A: Thanks for your interest in our products.
Yes, it is possible.
You can see our menus on
http://deluxe-menu.com
http://deluxe-tree.com
Create your menu in Deluxe Tuner application.
You can create any menu as you like in Deluxe Tuner.
Please, try to download trial package once again. We added alltemplates in Deluxe Tuner Templates window.
Unfortunately, Deluxe Tuner doesn't copy all need images forVista Template into your folder. You should do it manually.
After you create your menu in Deluxe Tuner you should copy all images youneed for the menu into your folder and correct images paths.
You should set the following parameter
var pathPrefix_img="";
2. You should install the menu on your page.
You can click, for example, File/Export to HTML (you can't do it inthe MAC version).
Add several rows into your html page.
<head>
...
<!-- JavaScript Tree Menu -->
<noscript><a href="http://deluxe-menu.com">Javascript Menu by Deluxe-Menu.com</a></noscript>
<script type="text/javascript"> var dmWorkPath="deluxe-menu.files/";</script>
<script type="text/javascript" src="deluxe-menu.files/dmenu.js"></script>
<script type="text/javascript" src="data-deluxe-menu.js"></script> //data-deluxe-menu.js - data file created in Deluxe Tuner.
...
</head>
<body>
...
<table>
<tr><td><script type="text/javascript" src="deluxe-menu.files/data.js"></script></td></tr>
</table>
...
</body>
You should also copy all engine files
dmenu.js
dmenu4.js
dmenu_add.js
dmenu_dyn.js
dmenu_key.js
dmenu_cf.js
dmenu_popup.js
dmenu_ajax.js
into "deluxe-menu.files/" folder. You should place this folder in thesame folder with your index. html page.
Try that.
Q: I'm a having an issue with my dhtml dropdown menus poping-up behind a flash object on a page. The key to this issue is that the menus work perfectly in our non-secure (HTTP) development environment, but do not work correctly on our secure (HTTPS) beta environment. The code on the 2 environments is exactly the same, and the beta environment does work when viewed in HTTP. Both the flash object and the Deluxe-Menu are called using relative paths, not absolute paths.
Please let me know what additional information you need from me. I appreciate any help you can provide.
A: Check that you're using latest version of engine files - v3.3.
You should add "opaque" parameter for <object> and <embed> tags.
See, how you should install flash on your pages.
<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,0,0" height="150"
width="732" name="if-header">
<param name="movie" value="images/flash/if-header.swf">
<param name="quality" value="best">
<param name="play" value="true">
<param name="wmode" value="opaque">
<embed height="150" name="if-header" pluginspage="http://www.macromedia.com/go/getflashplayer" src="images/flash/if-header.swf" type="application/x-shockwave-flash" width="732"
quality="best" wmode="opaque" play="true">
</object>
Q: Hello, I am interesting in purchasing your product, but first I need to know if it is possible to call a JavaScript function from the menu. I have read the FAQ and noted where it lists that you can perform an alert call, and that worked on my end as well, but when I attempted to call a function I created I could not get it to respond. Is it possible to call a function from your menu? Could I get an example?
A: You can write your own functions within menuItems, for example:
["|Real-Time Data Query","javascript:window.open('http://www.domain.org/', '_blank','height=758,width=1024,status=yes,toolbar=no, menubar=no,location=no');",,,'Query real time water quality data' ,'' , '', '', ,],