|
|
How would I get the index of the item in the html dropdown menu?
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 assume the menuInd is always 0 for the
first menu (or only in my case) menu on a page?
A:
Yes, menuInd is the number of the menu on your page (in your case
menuInd=0).
itemInd is the number of the item in your menuItems, for example:
var tmenuItems =
[
["Home", "http://deluxe-tree.com", "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 deluxe 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:
- Sep 06, 2006 - The alighment of the dropdown menu is off to the right in Firefox...
- Sep 06, 2006 - The first item of the html drop down menu stays highlighted.
- Sep 11, 2006 - How can I hide my dropdown menu on print?
- 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 25, 2006 - My menu icons are not appearing in the preview, or when I launch deluxe-menu.html
- Sep 26, 2006 - Is there a way to change the height of the main buttons in my simple dhtml menu.
- Oct 01, 2006 - All of the items in html pull down menu are different sizes.
- Oct 22, 2006 - When the html submenus are over applet in https: the applet disappeared.
- Oct 27, 2006 - In IE 6.0 and Firefox 1.5.0.4, the submenus of my dhtml dropdown menu are not visible
- Oct 30, 2006 - I don't see on my website dhtml mouseover menu that I saw on my local machine.
|