Recent Questions Javascript Tree Representation
Q: I have tried to use the Deluxe tuner menu in one of the websites I am trying to create however, the menu gives an error. I have created the menu multiple times but everytime it comes up with the same error. I have attached the entire web page file with this mail. Can you please go through this and help me fix the errors.
A: Now you have var itemBorderWidth=""; var menuBorderWidth="";
It is not correct. You should set values for these parameters.
var menuBorderWidth="0"; var itemBorderWidth="0";
Q: I can not figure out how to get the grey separator gif to show up in the navigation bar scripts.
Where in the DeluxeTuner do you select that?
A: You should add separators between your items,
use "Add separator" button on the mainwidow of Deluxe Tuner.
var menuItems = [
["Item1","", "", "", "", "", "", "", "", "", "", ],
["-","", "", "", "", "", "", "", "", "", "", ],
["Item2","", "", "", "", "", "", "", "", "", "", ],
["-","", "", "", "", "", "", "", "", "", "", ],
["Item2","", "", "", "", "", "", "", "", "", "", ],
["-","", "", "", "", "", "", "", "", "", "", ],
["Item4","", "", "", "", "", "", "", "", "", "", ],
["-","", "", "", "", "", "", "", "", "", "", ],
["Item5","", "", "", "", "", "", "", "", "", "", ],
["-","", "", "", "", "", "", "", "", "", "", ],
["Item6","", "", "", "", "", "", "", "", "", "", ],
["-","", "", "", "", "", "", "", "", "", "", ],
["Item7","", "", "", "", "", "", "", "", "", "", ],
];
var separatorVImage="separv1.gif";
var separatorVWidth="1px";
var separatorVHeight="21px";
Notice that I've used my on separator image, you should use your own image.
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: Do I need to replace the menudir/ in the code with the name of the folder I have placed the .js files?
A: Yes, you should change the name of the folder.
If you have, for example such file structure:
deluxe-menu_files/
dmenu.js
data.js
images/
html_pages/
page1.html
page2.html
index.html
So, you should install your menu in the following way:
<head>
<!-- JavaScript Tree Menu -->
<noscript><a href="http://deluxe-menu.com">Javascript Menu by Deluxe-Menu.com</a></noscript>
<script type="text/javascript"> var dmWorkPath = "deluxe-menu_files/";</script>
<script type="text/javascript" src="deluxe-menu_files/dmenu.js"></script>
<!-- (c) 2006, http://deluxe-menu.com -->
</head>
<body>
<script type="text/javascript" src="deluxe-menu_files/data.js"></script>
</body>
</span>