Javascript Tree Menu by Deluxe-Tree.com
   
(c) 2006, DHTML-Tree
 
   
   
 
 

    Javascript API

DHTML Tree allows you to change the javascript tree menu menu "on-the-fly" using external Javascript functions without page loading. These functions are contained in dtree_dyn.js module.
See How To Setup info.

User Functions

function dtreet_ext_userClick (itemID)

This function is called when you click on the item.
If the function returns true, the menu continues to perform its click event. In other case the menu stops it.
itemID - the ID property of a clicked item.

To catch a click event you should create this function within a page:

function dtreet_ext_userClick(itemID)
{
    // Your Javascript code here
    return true;
}




function dtreet_ext_userRightClick (itemID)

This function is called when clicking a right mouse button on the item.
A standard context menu appears if the function returns true. In other case it doesn't.
itemID - the ID property of a clicked item.

To catch a right click event you should create this function within a page:

function dtreet_ext_userRightClick(itemID)
{
    // Your Javascript code here
    return false;
}

Tree Menu Functions

function dtreet_ext_getItemIDByIndex (menuInd, itemInd)

Returns ID property of the item by item index.
menuInd - index of a tree menu on a page, >= 0.
itemInd - index of an item within the menu, >= 0.


function dtreet_ext_getNextItemID (itemID)

Returns ID of the item that follows the mentioned one.
itemID - ID property of an item.



function dtreet_ext_getPrevItemID (itemID)

Returns ID of the item that precede the mentioned one.
itemID - ID property of an item.



function dtreet_ext_getLastItemID (menuInd)

Returns ID of the last item.
menuInd - index of a tree menu on a page, >= 0.



function dtreet_ext_showItem (itemID, visibility)

Shows/hides a specified item or a sub menu.
itemID - ID property of an item. visibility - 0 - hide the item, 1 - show the item.



function dtreet_ext_expandItem (itemID, expand)

Expands/collapses a mentioned item or a sub menu.
itemID - ID property of an item. expand - 0 - expand the item, 1 - show the item.



function dtreet_ext_insertItem (menuInd, parentItemID, itemInd, itemParams)

Creates a new item and inserts it into a specified position.
menuInd - index of a tree menu on a page, >= 0.
parentItemID - ID property of an item.<, >= 0.
itemInd - index of a new item within the menu, >= 0.
itemParams - item parameters.
This menu parameter has the equal structure as an item in tmenuItems array.
Use this fuction to assign parameters for the existent menu item (for example, when you want to make a duplicate of the present item) or create new ones.

Structure of itemParams:
       [item_text, link, icon_normal, icon_over, icon_expanded, tip, target, individual_style_index, individual_xp_style_index]



function dtreet_ext_deleteItem (menuInd, itemID)

Deletes an item or a sub menu.
menuInd - index of a menu on a page, >= 0. itemID - ID property of an item.



function dtreet_ext_changeItem (menuInd, itemID, itemParams)

This fuction allows you to change parameters and an appearance of the menu items.
menuInd - index of a tree menu on a page, >= 0.
itemID - ID property of an item.
itemParams - item parameters.
This menu parameter has the equal structure as an item in tmenuItems array.
Use this fuction to assign parameters for the existent menu item or create new ones.

Structure of itemParams:
       [item_text, link, icon_normal, icon_over, icon_expanded, tip, target, individual_style_index, individual_xp_style_index]



function dtreet_ext_setPressedItem (menuInd, itemID)

Use this function to set a current pressed item.
menuInd - index of a menu on a page, >= 0. itemID - ID property of an item.



function dtreet_ext_getItemParams (menuInd, itemID)

Returns item parameters in the array:
      [item_id, index_within_submenu, parentID, level, has_child, child_count, expanded, text, link, target, tip, align, icons, hidden, disabled, visible]

menuInd - index of a tree menu on a page, >= 0. itemID - ID property of an item.



function dtreet_ext_getMenuParams (menuInd)

Returns menu parameters in the array:
       [menu_id, root_items_count, items_count, pressed_item_id]

menuInd - index of a menu on a page, >= 0.


   
Copyright (c) 2009, DHTML-Menu.com
Home  |  Product Info  |  Samples  |  Download  |  Purchase  |  FAQ  |  Site Map  |  Write Us
All rights reserved. criar sites gratis | Mobirise Themes | best web design software | bootstrap navbar template | image slider