|
|
How would I get the index of the item in the menu html code?
Return to Recent Questions
Q:
> You should call the following function:
> dtreet_ext_getItemIDByIndex (0, 12)
> where 12 - is index of the item.
How would I know that 12 is the index of the item? How is itemInd
different from its itemID? I don't understand ! I think the menuInd is always 0 for the
first menu (or only in my case) menu html code menu on a page?
A:
Yes, menuInd is the number of the menu html code on your page (in your case
menuInd=0).
itemInd is the number of the item in your menuItems, for example:
var tmenuItems =
[
["Home", "http://dhtml-menu.com/dhtml-tree/", "icon1_t.gif", "icon1_to.gif","", "Home Page Tip","_blank"],//itemInd=0
["<img src='data_files/images/sep.gif' width=113 height=1>"],//itemInd=1
["+What's New<br><span id='letter'>This is pretty cool. I need to
buy this DHTML Menu</span>", "", "icon2_t.gif", "icon2_to.gif", "", "Product Info Tip"],//itemInd=2
["|What's New", "testlink.htm", ""], //itemInd=3
["|Features", "testlink.htm", ""], //itemInd=4
["|Installation", "testlink.htm", ""], //itemInd=5
["|Functions", "testlink.htm", ""], //itemInd=6
["|Supported Browsers", "testlink.htm", ""], //itemInd=7
["Samples", "", "icon3_t.gif", "icon3_to.gif", "", "Samples Tip"], //itemInd=8
["|Sample 1", "testlink.htm", ""], //itemInd=9
["|Sample 2", "testlink.htm", ""], //itemInd=10
["|Sample 3", "", ""], //itemInd=11
["||New Sample 1", "testlink.htm", ""],//itemInd=12
["||New Sample 2", "testlink.htm", ""],//itemInd=13
Return to Recent Questions
Related:
- March 23, 2009 - My menu html code doesn't work on IE6. No rollovers, no drop downs.
- Apr 10, 2009 - I can not figure out how to fix the menu html code from going off the page in Mozilla...
- Apr 27, 2009 - Does your license for menu html code need to be tied to a domain name to work?
- May 15, 2009 - We want to set a specific width for each top level item in the menu html code
- May 31, 2009 - Is there a way submenu's to be the same for first and second level in menu html code
- Jun 18, 2009 - The background images is missing in menu html code
- Jul 05, 2009 - My menu html code submenu is not display at the correct position with Firefox.
- Jul 23, 2009 - I can't see menu html code on my test page only direct links...
- Aug 08, 2009 - If a user selects menu html code in the upper frame he get the menu html code that is in the content frame...
- Aug 26, 2009 - I want to change the menu html code item link text from status bar messages to another value?
- Sep 12, 2009 - How I can change the background color of the menu html code?
|