Can you please give me an example of how I would return the full path to the selected item of the web site menu?
Return to Recent Questions
Q:
Can you please give me an example of how I would return the full path to the selected item of the web site menu?
A:
See the following example:
function getFullPath(mInd){
var result='';
// get pressed item
var params = dm_ext_getMenuParams(mInd);
if (!(params[2]>=0)) return '';
function getPathForItem(mInd,smInd,itInd){
// get for this item
var params = dm_ext_getItemParams(mInd,smInd,itInd);
var result = params[2]+ '('+ params[3]+')';
// find root item id
if (smInd <= 0) return result;
params = dm_ext_getSubmenuParams(mInd,smInd);
for (var smInd_=0;smInd_
for (var itInd_=0;itInd_
itParam = dm_ext_getItemParams(mInd,smInd_,itInd_);
if (itParam[0]=arams[2])// id
return result + '->' + getPathForItem(mInd,smInd_,itInd_);
}
}
return result;
};
return getPathForItem(mInd,params[1],params[2]);
}
Return to Recent Questions
Related:
- Sep 02, 2006 - Little vertical spacers between menu items in the drop down menu.
- Sep 04, 2006 - Set a menu item to pressed when a page is loaded.
- Sep 06, 2006 - The first item of the html drop down menu stays highlighted.
- Sep 11, 2006 - If I use doctype the settings of the submenus in javascript dropdown menu get lost.
- Sep 16, 2006 - I need to be able to highlight the selected menu item of the html tree menu.
- Sep 26, 2006 - Why is the submenu has a different colour than menu items in the javascript menu bar?
- Oct 01, 2006 - All of the items in html pull down menu are different sizes.
- Oct 05, 2006 - Is it easy to incorporate your Menu into a website created on Front Page?
- Oct 07, 2006 - How do you change the back ground color of the javascript horizontal menus?
- Oct 26, 2006 - I would like to load an iframe into one of the items in oncontextmenu.
- Oct 28, 2006 - Subitems of the mouseover menu don't close when the mouse goes away...
|