Recent Questions Javascript Simple Tree
Q: A brief one on dynamic menu in the perspective of bilinguism
I understood from the tuner that a menu can be made dynamic (although it is somewhat minimally documented ;-))
Leaving alone all the beautiful sophisticated and complex mechanic of it
Say I have my main menu that says :
var dynamic=1; (that's all I got from the doc ..)
And then
var menuItems = [
["Choice 1 ","page1.php", "", "", "Choice 1",", "_self", "", "", "", "", "", ],
["Choice 2","page2.php", "", "", "Choice 2", "_self", "", "", "", "", "", ],
];
Minimalist ? ;-) right ?
1/ first I'm not too sure about what exactly in order are these 11 parameters although I'm fine with the only 4 I have here
2/ if I would want to change on the fly menu javascript dropdown page on a PHP parameter Page1.php?lang=French (I perfectly master how to capture the PHP value)
So that My menu becomes on the fly
["Choix 1 ","page1.php", "", "", "Choix 1",", "_self", "", "", "", "", "", ],
["Choix 2","page2.php", "", "", "Choix 2", "_self", "", "", "", "", "", ],
Thanks in advance if you can shed some light on this
PS : And although I used hardly 1% of deluxe capability my first customer is very happy about it..
A: Actually you can find all info about the menu javascript dropdown parameters and featureson our website:
- menu parameter and items, Individual Styles:
http://deluxe-menu.com/parameters-info.html
http://deluxe-menu.com/menu-items-info.html
http://deluxe-menu.com/individual-item-styles-info.html
http://deluxe-menu.com/individual-submenu-styles-info.html
- dynamic functions:
http://deluxe-menu.com/functions-info.html
http://deluxe-menu.com/dynamic-functions-sample.html
> 2/ if I would want to change on the fly page on a PHP parameter
> Page1.php?lang=French (I perfectly master how to capture the PHP value)
> So that My menu becomes on the fly
> ["Choix 1 ","page1.php", "", "", "Choix 1",", "_self", "", "", "", "", "", ],
> ["Choix 2","page2.php", "", "", "Choix 2", "_self", "", "", "", "", "",> ],
To change the menu items on the fly you can use API functions
function dm_ext_changeItem (menuInd, submenuInd, itemInd, iParams)
function dm_ext_addItem (menuInd, submenuInd, iParams)
function dm_ext_changeItemVisibility (menuInd, submenuInd, itemInd, visibility)Q: Currently let us know how can we align the text at the top dropdown menu script so that the text will appear above the horizontal line.
Kindly help us to solve this problem as soon as possible.
A: Unfortunately you cannot set vertical align for items text.But you can try to write your item text in the following way:
var menuItems = [
["Home<br> ","/index.asp?pgid=1", , , , , "0", , , ],
["About Us<br> ","/index.asp?pgid=2", , , , , "0", , , ],
["Company News<br> ","/index.asp?pgid=3", , , , , "0", , , ],
["Services<br> ","/index.asp?pgid=4", , , , , "0", , , ],
["|Custom Publishing","/index.asp?pgid=6", , , , , , , ,],
["|On Product Publishing","/index.asp?pgid=7", , , , , , , , ],
["|Investment","/index.asp?pgid=10", , , , , , , , ],
["Contact Us<br> ","/index.asp?pgid=5", , , , , "0", ,, ],
];
Q: I have tested and tested but can't find out how I can add the following, as a link in drop down navigation bar. Can you please help?
http://domain.no/secure/modules/tutorials/cpanel-x3/cpanel-x3-addon.swf" rel="shadowbox;height=450;width=780"
A: You should add <a> tag into the text field in that case:
["<a href="http://domain.no/secure/modules/tutorials/cpanel-x3/cpanel-x3-addon.swf" rel="shadowbox;height=450;width=780">test</a>","",""]
But you should specify a styles for this link also.Q: There is "Incorrect Copyright" message on our website in IE7. Please, help!
A: Now on your website you're using JavaScript Tree Menu v1.14.
You see "Incorrect Copyright" message because you're using old version of JavaScript Tree Menu. We've fixed this bug in the new version - v2.0.
How to upgrade to v2.00
---------------------------------------------------------------
You can download the licensed engine .js files from the same link in your license message.
JavaScript Tree Menu v2.00 has new parameters and features.
To upgrade to v2.00 you should do the following.
Step 1.
1.1 For Windows users
a. Run Deluxe Tuner v2.0
(can be found in the trial menu package v2.0
http://deluxe-menu.com/deluxe-menu.zip).
b. Open menu data file (.js file where menu parameters are placed):
select File/Open…
c. Save the file: select File/Save, then click "No" button when the dialog box appears.
1.2 For other OS users
a. Open menu data file (.js file where menu parameters are placed) in a text editor.
b. Make sure that the following variables exist in the data file:
var keystrokes = 0;
var dm_focus = 1;
var dm_actKey = 113;
var dynamic = 0;
var smHideOnClick = 1;
var itemAlignTop = 'left';
var smSmartScroll = 1;
var dmAJAX = 0;
var dmAJAXCount = 30;
var dmRTL = 0;
var dmObjectsCheck = 0;
var menuBackRepeat = "repeat";
var menuHeight = "";
var transDuration2 = 200;
If one of the variables doesn't exist - add it at the beginning of the file.
c. Save the file.
Step 2. Now open HTML-page that contains JavaScript Tree Menu.
Step 3. Replace existent <noscript></noscript> tags of the menu by the following code:
<noscript><a href="http://deluxe-menu.com">Javascript Menu by Deluxe-Menu.com</a></noscript>
Step 4. Save HTML-page.
Step 5. New engine v2.00 has 7 .js files.
They are:
- dmenu.js
- dmenu4.js
- dmenu_add.js
- dmenu_dyn.js
- dmenu_key.js
- dmenu_cf.js (new v2.00)
- dmenu_popup.js (new v2.00)
Replace all old .js files by the files from v2.00.
Try that.