Recent Questions Menu Function Tree Net Mobile Phone
Q: So, as you can see, I use "_self" in order to make the URL open in same window when left-clicked. If I set it to empty it opens in new window (is that correct behaviour (I thought we should use _blank to get that effect).
A: In the menuItems you can set target parameter for each itemindividually.
The following parameter:
var itemTarget="_blank";
sets target for all items, so if you haven't specified target for theitem
["Arbeidsplaner","cp_workplan.php",,,,"","0","0"],
the target for this item will be "_blank".
Q: Is there a way to have the menu stay expanded in the same exact state when
I click on a menu item of the javascript tree view and go to a new page?
A: There is no need to write additional code on a server side to remember what items were expanded/collapsed.
DHTML Tree Menu can save items state automatically.
Please, see the example of the menu that works with cookies:
http://dhtml-menu.com/tree-examples/tree-menuxp-save-state.html
Set the following parameter:
var tsaveState = 1;
and the menu remembers its structure for each user who visit your page.
Try to expand/collapse items. Then reload the page and you'll see results.
Q: Is it possible to expand thetree menu javascript in a predefined way?
Lets say, Item 1 expanded, Item 2 not expanded, anyway, it should look like I select it in the ITEMS program window.
Now it is exanded completely or not, like I use the switch in the common parameters.
A: You can expand some items by default.
Add '+' sign before items text in that case:
["+Javascript/DHTML Tree: XP Style","", "deluxe-tree.files/xpicon1_s.gif", "", "", "XP Title Tip", "", "0", "", "", ],
["|Home","testlink.htm", "deluxe-tree.files/icon1_s.gif", "deluxe-tree.files/icon1_so.gif", "", "Home Page Tip", "", "", "", "data-new.js", ],
"Javascript/DHTML Tree: XP Style" item will be expanded by default in that case.
Use var texpanded=1; parameter to expand all menu items by default.
Use function dtreet_ext_expandItem (itemID, expand) API function to expand the specificmenu items dynamically:
http://deluxe-tree.com/functions-info.htmlQ: My site has three levels of a folder structure. Can I create a menu that will allow me to link in and out of folders? Or must I design three menu's with different link locations.
A: You can use one menu.
Use additional parameters to make menu paths absolute:
var pathPrefix_img = "http://domain.com/images/";
var pathPrefix_link = "http://domain.com/pages/";
These parameters allow to make images and links paths absolute.
For example:
var pathPrefix_img = "http://domain.com/images/";
var pathPrefix_link = "http://domain.com/pages/";
var menuItems = [
["text", "index.html", "icon1.gif", "icon2.gif"],
];
So, link path will be look so:
http://domain.com/pages/index.html
Images paths will be look so:
http://domain.com/images/icon1.gif
http://domain.com/images/icon2.gif
Please, try to use these parameters.