(c) 2005, Deluxe-Menu.com
Search  
Ctrl+F2 - enter/switch menu | Arrow keys - navigate | Esc - exit menu  
   
   
  Product Info
  What's New
  Features
  Installation

  Deluxe Tuner GUI

  Javascript API
  Description of Files
  Supported Browsers

  Customization
  Parameters
  Menu Items
  Individual Item Styles
  Individual Submenu Styles
 

    Javascript API

Deluxe Menu has external Javascript functions that allow you to change the menu "on-the-fly".
To enable Javascript API set the following menu parameter:

var dynamic = 1;

Functions List

New! v2.0
function dm_ext_createSubmenu (menuInd, submenuInd, itemInd, iParams)

Creates new submenu with 1 new item.
menuInd - index of a menu on a page, >= 0.
submenuInd - index of a submenu, >= 0.
itemInd - index of a parent item, >=0.
iParams = [array] - the array of item parameters. This parameter has the same structure as an item in menuItems array. You can assign parameters of another existent item of the menu or create new ones.

Structure of iParams:
      [item_text, link, icon_normal, icon_over, tip, target, individual_style_index, jsFilename]



New! v2.0
function dm_ext_deleteSubmenu (menuInd, submenuInd)

Deletes the submenu.
menuInd - index of a menu on a page, >= 0.
submenuInd - index of a submenu, >= 0.


function dm_ext_changeItem (menuInd, submenuInd, itemInd, iParams)

Changes parameters and an appearance of the item.
menuInd - index of a menu on a page, >= 0.
submenuInd - index of a submenu, >= 0.
itemInd - index of an item, >=0.
iParams = [array] - the array of item parameters. This parameter has the same structure as an item in menuItems array. You can assign parameters of another existent item of the menu or create new ones.

Structure of iParams:
      [item_text, link, icon_normal, icon_over, tip, target, individual_style_index, jsFilename]



function dm_ext_addItem (menuInd, submenuInd, iParams)

Adds the new item to a submenu.
menuInd - index of a menu on a page, >= 0.
submenuInd - index of a submenu, >= 0.
iParams = [array] - the array of item parameters. This parameter has the same structure as an item in menuItems array. You can assign parameters of another existent item of the menu (for example, when you want to create a duplicate of the existent item) or create new ones.

Structure of iParams:
      [item_text, link, icon_normal, icon_over, tip, target, individual_style_index, jsFilename]



function dm_ext_deleteItem (menuInd, submenuInd, itemInd)

Deletes the item.
menuInd - index of a menu on a page, >= 0.
submenuInd - index of a submenu, >= 0.
itemInd - index of an item, >=0.


function dm_ext_changeItemVisibility (menuInd, submenuInd, itemInd, visibility)

Shows/hides the item.
menuInd - index of a menu on a page, >= 0.
submenuInd - index of a submenu, >= 0.
itemInd - index of an item, >=0.
visibility = true/false - visibility of the item.

function dm_ext_setPressedItem (menuInd, submenuInd, itemInd, recursion)

Sets a current pressed item.
menuInd - index of a menu on a page, >= 0.
submenuInd - index of a submenu, >= 0.
itemInd - index of an item, >=0.
recursion = true/false - highlight parent items.

function dm_ext_hideAllSubmenus (menuInd)

Hides all shown submenus for the specified menu.
menuInd - index of a menu on a page, >= 0.



function dm_ext_getMenuParams (menuInd)

Returns menu parameters in the array:
      [submenus_count, current_pressed_submenu, current_pressed_item]

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

function dm_ext_getSubmenuParams (menuInd, submenuInd)

Returns submenu parameters in the array:
      [submenu_id, items_count, parent_item_id, submenu_level, is_horizontal]

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


function dm_ext_getItemParams (menuInd, submenuInd, itemInd)

Returns item parameters in the array:
      [item_id, has_submenu, text, link, target, status, tip, align, icons, disabled, pressed, visible, deleted]

menuInd - index of a menu on a page, >= 0.
submenuInd - index of a submenu, >= 0.
itemInd - index of an item, >=0.

Copyright (c) 2006, Deluxe-Menu.com
Home  |  Product Info  |  Samples  |  Download  |  Purchase  |  FAQ  |  Site Map  |  Write Us
All rights reserved. Tree Menu  |  Tabs Menu  |  Deluxe Menu.de