Recent Questions Filetree Loading Message
Q: Is there some chance to use calling of JScript function from Item of deluxe menu?
Something about:
var menuItems = [
["Calling alert","alert ('Hello');", "icon_win98_1.gif", , , , , , , ]
];
A: Thanks for your interest in our products.
You can use your own javascript functions in the menu items.
You should paste "javascript:some_function()" into item's link field, for example:
var menuItems = [
["text", "javascript:your_function(...)", ...]
];
Q: If you take a look at the upper menu, I have "|" separating all of the various menu items. How can I do this with JavaScript Tree Menu?
I don't want to resort to using messages and would like to use the "|" character if at all possible.
A: You can paste a separator.
Please, see the following parameters:
//------- Separators -------
//--- Separators
var separatorImage="";
var separatorWidth="5";
var separatorHeight="100%";
var separatorAlignment="right";
var separatorVImage="images/public/separator.gif";
var separatorVWidth="3";
var separatorVHeight="100%";
var separatorPadding="";
You should set a separator in the menuItems, for example:
var menuItems = [
["Home","index.cfm", , , , , , , , ],
["-"],
["About Us","about.cfm", , , , , , , , ],
];
Q: I made a css tab menu on this website and I noticed that I need to click two time to get the link.
It doesn't work if I click only one time. Could you help me to fixe that ?
A: You should set correct selected item:
var bselectedItem=2; //0,1,2...
Set also:
var tabMode=0;
var bselectedSmItem=0;
In that case you should write your links in the following way:
["Hem","link:index.php?p=1_10", "", "", "", "", "", "", "", ],
["Om oss","link:index.php?p=1_11", "", "", "", "", "", "", "", ],
["Kontakt","link:index.php?p=1_12", "", "", "", "", "", "", "", ],
Q: I need to be able to highlight the selected menu item of the sliding drop down menu.
A: JavaScript Tree Menu has only two states normal and mouseover.
Try to do the following things:
- delete var pressedItem=1; parameter from your data file
- set correct parameter on each page before you call data file, forexample:
<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=3;</script>
...
<script type="text/javascript" src="menudir/data.js"></script>
You can also set a pressed item using Javascript API:
function dm_ext_setPressedItem (menuInd, submenuInd, itemInd, recursion)
Sets a current pressed item.
menuInd - index of a menu on a page, >= 0.
submenuInd - index of a submenu, >= 0.
itemInd - index of an item, >=0.
recursion = true/false - highlight parent items.
But notice, to use dm_ext_setPressedItem() you should know ID of selected item and subitem.
You can't get this ID after you reload your page. That is why you should write your own code on PHP.