Is it possible set a pressed item when you have multiple web navigation bar on the page?
Return to Recent Questions
Q:
Is it possible set a menu item to pressed when a page is loaded
when you have multiple web navigation bar on the page?
I have 2 menus side by side and I was able to set the pressed
item with the JavaScript API as described in your FAQs but when I
try to show an item as pressed in a second menu on the same page,
the corresponding item in the first menu shows as pressed. Is there
a different function that I can use for this or a way to reset the
menu ID in the second menu to start from where the first menu left
off so I can use the same function?
A:
See the first parameter in
dm_ext_setPressedItem (menuInd, submenuInd, itemInd, recursion)
function is index of the menu.
So, if you use several menus on the one page you should use different
menuInd parameter.
For example you have:
<script type="text/javascript" src="menu/data1.js"></script> //menuInd=0
...
<script type="text/javascript" src="menu/data2.js"></script> //menuInd=1
...
<script type="text/javascript" src="menu/data3.js"></script> //menuInd=2
...
<script type="text/javascript" src="menu/data4.js"></script> //menuInd=3
So, for the second web navigation bar you should write:
dm_ext_setPressedItem (1, 2, 5)
Return to Recent Questions
Related:
- March 14, 2009 - How do I enable javascript on the new browser, so I can see my web navigation bar?
- March 17, 2009 - Can the vertical dropdown menu items be set so they are all the same width?
- March 31, 2009 - Is there any way can we display submenu items on mouse over in web navigation bar?
- Apr 01, 2009 - How can I set different parameters for diferent items in my mouse over drop down menu?
- Apr 17, 2009 - I have 25 images on one page. I want to use it's own popup web navigation bar for each image.
- May 05, 2009 - I'm wondering if you can use the ASP code within Item Link of the web navigation bar?
- May 15, 2009 - We want to set a specific width for each top level item in the menu html code
- May 22, 2009 - I would like to have links of web navigation bar to our website when javascript turned off.
- Jun 08, 2009 - Is it possible to call JScript functions from web navigation bar?
- Jun 26, 2009 - I'm looking for a web navigation bar system that can be placed in a table cell.
- Jun 28, 2009 - Does your effective website navigation allows to keep the pressed menu-item hightlighed?
|