Recent Questions Javascript Tree Graph
Q: Is it possible to have menu items act like regular hyperlinks?
For instance in Firefox I like to "middle click" hyperlinks to open them in a new tab, or in IE right click and open in new window.
However with Deluxe-Menu this does not seem to work.
A: If you want to open your links in the new window you should set the item target parameter to "_blank", for example:
var menuItems = [
["Home","testlink.html", , , , "_blank", , , , ],
...
You can include also any html code in the Item Text.
For example:
["<a href='http://deluxe-menu.com/'>Home</a>","", , , , , , , , ],
Q: However, I did not see how you get the content of link value of the tab to display below horizontal tabs.
A: See in Deluxe Tabs there are two modes:
1. var tabMode=0;
You can create only one level of tabs and assign Object Id's of the
DIV's to show when you click on the tab.
["XP Tab 1","content1", "", "", "", "", "", "", "", ],
["XP Tab 2","content2", "", "", "", "", "", "", "", ],
["XP Tab 3","content3", "", "", "", "", "", "", "", ],
["XP Tab 4","content4", "", "", "", "", "", "", "", ],
2. var tabMode=1;
You can assign only links in this mode.
You should create top level items with subitems.
["XP Tab 1","", "", "", "", "", "", "", "", ],
["|Link 1_1","http://deluxe-tabs.com", "", "", "", "", "0", "", "", ],
["|Link 1_2","testlink.htm", "", "", "", "", "0", "", "", ],
["|Link 1_3","testlink.htm", "", "", "", "", "0", "", "", ],
["|Link 1_4","testlink.htm", "", "", "", "", "0", "", "", ],
["|Link 1_5","testlink.htm", "", "", "", "", "0", "", "", ],
["XP Tab 2","", "", "", "", "", "", "", "", ],
["|Link 2_1","testlink.htm", "", "", "", "", "0", "", "", ],
["|Link 2_2","testlink.htm", "", "", "", "", "0", "", "", ],
["|Link 2_3","testlink.htm", "", "", "", "", "0", "", "", ],
["|Link 2_4","testlink.htm", "", "", "", "", "0", "", "", ],
["|Link 2_5","testlink.htm", "", "", "", "", "0", "", "", ],
["XP Tab 3","", "", "", "", "", "", "", "", ],
["|Link 3_1","testlink.htm", "", "", "", "", "0", "", "", ],
["|Link 3_2","testlink.htm", "", "", "", "", "0", "", "", ],
["|Link 3_3","testlink.htm", "", "", "", "", "0", "", "", ],
["|Link 3_4","testlink.htm", "", "", "", "", "0", "", "", ],
["|Link 3_5","testlink.htm", "", "", "", "", "0", "", "", ],
You can use Object ID as well as Link in both modes. Use the following prefixes within item's link field:
"object:" - means that there is object id after it;
"link:" - means that there is a link after it.
"javascript:" - means that there is a javascript code after it, for example:javascript:alert(\'Hello!\')
So, you should write for example:
["|Link 1_1","object:Content1_1", "", "", "", "", "0", "", "", ],
Q: May I use this menu in Arabic mode I mean in right to left mode?
If yes please let me know how?
A: You're able to use any characters for JavaScript Tree Menu in the same way asyou use them for standard html page.
The only issue is that submenus can be shown in incorrect positionwhen you're using dir=rtl for your page.
var dmRTL = 0;
Set this parameter to 1 if you're using right-to-left direction of html page <HTML dir=rtl>.
Use also
var smViewType = 2;
for right-to-left languages.
Please, see example:
http://deluxe-menu.com/ways-showing-submenus-sample.html
This examples demonstrates how the menu can change a submenusdirection. Use var smViewType parameter to change a submenusdirection:
var smViewType = 0..3;
Values:
0 - from left to right;
1 - from left to right + upwards;
2 - from right to left;
3 - from right to left + upwards;
In JavaScript Tree Menu when you call data .js file you can try to specify the encoding:
<script src="data.js" charset="utf-8"></script>
Unfortunately, you can't use arabic characters in Deluxe Tuner application.You should manually correct your code.
Q: I have created a menu for a product tutorial. It consists of about 50 topics, each of which is listed in my menu. I’m wondering if there is a way to gray out the menu link for the open tutorial topic?
A: Unfortunately, JavaScript Tree Menu doesn't have such a feature.
You should write your own code, for example, on PHP.
You can try to use the following function
function disable() {
dm_ext_changeItem(1, 1, 1, ["", "", "", "", "", "_"]);
}
to disable your items.
The example you can find on our site
http://www.deluxe-menu.com/dynamic-functions-sample.html
Please, see the source code.