Recent Questions
Q: Please tell me in very plan instructions how to load the dhtml menu slide on to a blank Front Page web page?
A: You should do the following things:
1. Create your menu in Deluxe Tuner.
2. Export the menu into html file "File/Export/To HTML".
3. Copy generated folder with all engine .js files and images
("deluxe-menu.files/" by default) and data-deluxe-menu.js (by default) into the same folder with you index.html page (created inFrontPage).
4. Now you should add several rows of code into your index.html file.
You can do it in FrontPage (open HTML source of the page and edit it)
or in any text editor. Open your index.html page and edit it.
Notice that you'll have errors in the Preview. But you won't get errors if you open this page in the browser.5. Add the following code in the tag:
<!-- Deluxe Menu -->
<noscript><a href="http://deluxe-menu.com">Javascript Menu by Deluxe-Menu.com</a></noscript&ht;
<script type="text/javascript">> var dmWorkPath="deluxe-menu.files/";</script>
<script type="text/javascript" src="deluxe-menu.files/dmenu.js"></script>
and
<script type="text/javascript" src="data-deluxe-menu.js"></script>
in the place where you want to have the menu.
You can paste it in <table>, <div> tags.
For example:
<div align=center>
<script type="text/javascript" src="data-deluxe-menu.js"></script>
</div>
6. Save your index.html page and open it in any browser.
Q: Now I wonder what I have to do in my script to make dhtml sub menu be displayed horizontal instead of vertical. I want them to display vertical be left - aligned and be shown by a white Background. How can I achieve this?
A: You should set the following parameters:
var smColumns=0;
var smOrientation=1; //horizontal orientation of submenus
set white backcolor for submenus
["itemWidth=60px","itemBackColor=#FFFFFF,#FFFFFF","itemBorderWidth=0","itemBorderStyle=none,",
"itemBorderColor=#FFFFFF,", "fontColor=#404040,#404040","fontDecoration=none,underline"],
Q: Some menu entries may be disabled and clicking on them should produce predefined javascript alert message?
A: To create disabled items you should set "_" symbol in the targetparameter of the menuItems.
If the target is "_" the item is disabled.
You can assign a font color for all disabled items using the following menu parameter:
var fontColorDisabled = "#AAAAAA";
You can write a javascript code instead of an item link:
["item text", "javascript:alert('Hello World')", , , ,"_",]
That's all.
Q: How I can write the changed dhtml pull down menu into a database?
A: Unfortunately, we don't have such example.
You may generate a menu from a database or XML using any server-side script, e.g., PHP, ASP, VB, etc.However, these scripts don't work inside of Javascript .js files, so, you should move parameters of a menu from a .js file into an html-page, e.g.:
<!-- Deluxe Tree -->
<noscript><a href="http://deluxe-tree.com">Javascript Tree Menu by Deluxe-Tree.com</a></noscript>
<script type="text/javascript" src="menudir/dtree.js"></script>
<!-- (c) 2006, http://deluxe-tree.com -->
<script type="text/javascript" language="JavaScript1.2">
// and describe parameters of a menu
var parameter1=value1;
var parameter2=value2;
etc.
var tmenuItems = [
// here you generate items using server-side scripts (php, asp, vb, etc.)
];
</script>
The example of the menu working with PHP/MYSQL you can find here:
http://deluxe-menu.com/rq-loading-bar-MySQL-support.html
This example is not for Deluxe Tree menu, but you can create your menu in the same way.