Recent Questions Javascript Examples To Costruct A Tree
Q: How does one go about changing the parameter or the JavaScript so
that a menu selection stays 'on' for the navigation bar script?
In other words, the menu remains selected, perhaps in a background color
that shows the user this menu choice is selected and the user is in the selected menu area.
A: To save your navigation path you should set the following parameter:
var saveNavigationPath = 1;
The menu keeps items highlighted during menu navigation.
0 - disabled, 1 - enabled (default).
You can highlight menu items by default in two ways:
1) Set the pressed item on each page idividually using the following parameter:
var pressedItem = -2;
The toggle mode. Sets an index of an item that will be highlighted by default.
-2 - the toggle mode is disabled;
-1 - the toggle mode is enabled, but no items highlighted by default;
0,1,2,3,... - index of highlighted item in a top-level menu.
- delete var pressedItem=1; parameter from your data file
- set correct parameter on each page before you call data file, for example:
<noscript><a href="http://deluxe-menu.com">Javascript Menu by Deluxe-Menu.com</a></noscript>
<script type="text/javascript"> var dmWorkPath = "menudir/";</script>
<script type="text/javascript" src="menudir/dmenu.js"></script>
<script type="text/javascript"> var pressedItem=2;</script>
...
<script type="text/javascript" src="menudir/data.js"></script>
2) Set the pressed item/subitem using dm_ext_setPressedItem () function.
Please see more info here:
http://deluxe-menu.com/highlighted-items-sample.html
Q: I am just in the process of evaluating your deluxe menus product for possible purchase.
I have installed the product and i am using the Deluxe Tuner product to create my menus based on the Vista 3-08 template.
I save the project and it adds the .js files in the correct location ( all under Menu folder in my project), but none of the images for the top level menu are copied (btn_red.gif or btn_red2.gif).
So when i run my website, i see the drop down menus but no header menu images (see attached image).
What image files need copying to which location in my websites main folder?
A: When you save your menu in Deluxe Tuner (use "Save as..." or "Exportto HTML" functions) you'll get a folder with all engine files(dmenu.js, dmenu_add.js ...) and all images.
So, for Vista Style 3-08 template you'll have the following images:
arr_white.gif
arrv_white.gif
blank.gif
btn_red.gif
btn_red2.gif
You should copy folder with all these files on your server.
Q: Do I need to generate a html file after I create dhtml menu and than work from that file? Or can I just copy and paste the code into my existing html file?
A: It will be better create dhtml menu in Deluxe Tuner and save your menu as html file. And copy html codefor the menu from this file into your page. You should also copyfolder with all menu file and data file with menu parameters into the same folder with you html page.
Q: However, when I place it inside a CSS-defined div element (for absolute page placement) the submenu's all drop down a couple hundred pixels.
A: See, the problem is that the script can't get css properties of the object if they are described in separate .css block (or file).In other words, you can't get the value of "POSITION: absolute" attribute of the object if the object doesn't have this property within inline style (style="POSITION:absolute;"). To get the value you should move .css style into style="" attribute.
Please, try to add your
css file -> inline css, for example:
You should add style="POSITION: absolute;"
to the
<div id="menu">
So, you'll have:
<DIV id="menu" style="POSITION: absolute;">
Try that.