(c) 2016, Deluxe-Menu.com
Search  
Ctrl+F2 - enter/switch menu | Arrow keys - navigate | Esc - exit menu  
  Support
  FAQ
  Contacts
  About Us
  Recent Questions


 

    Two menus are getting highlighted, the "Home" and the dynamic html menu which is called onLoad using dm_ext_setPressedItem() function..

Return to Recent Questions


Q: Thanks, we tried giving var pressedItem=0; and the script as below:

<script type="text/javascript">
onload=setPressed;
function setPressed()
{
dm_ext_setPressedItem (0,8,0,0);
}
</script>

We are facing 2 problems

1) Two menus are getting highlighted, the "Home" and the dynamic html menu which is called onLoad using dm_ext_setPressedItem (0,8,0,0); function)

2) The submenu of the dm_ext_setPressedItem (0,8,0,0) is not getting highlighted.

A: Try to set
var pressedItem=-2;

dm_ext_setPressedItem function has a following parameters:
function dm_ext_setPressedItem (menuInd, submenuInd, itemInd, recursion, parentOpen)

So, if you want to highlight item in the submenu you should use itemInd of this item (not itemInd of the parent item).

For example you want to highlight submenu item of the 'Manage Users' parent item with
itemInd=15.
You can find more info about dynamic html menu indexes here:
http://deluxe-menu.com/highlighted-items-sample.html#ind

So you should write the function in the following way:
dm_ext_setPressedItem (0, 3, 15, 1, 1)

menuInd = 0 if you have only one menu on the page
submenuInd = 3, see how to determine submenuInd in the table

http://deluxe-menu.com/highlighted-items-sample.html#ind
itemInd = 15, see how to determine itemInd in the table

http://deluxe-menu.com/highlighted-items-sample.html#ind
recursion = 1, to highlight parent items
parentOpen = 1, to open the submenu with the selected item.





Return to Recent Questions

Related:
Bootstrap Site Themes Review Responsive Site Theme  |  Responsive Website Maker  |  Fresh CSS Bootstrap Carousel Video Players and Nav Menu Demos  |  36 Top Eye-catching and Free AMP Elements Templates for 2021  |  Mobile-friendly Page Maker  | 
Copyright (c) 2019, Deluxe-Menu.com
Home  |  Product Info  |  Samples  |  Download  |  Purchase  |  FAQ  |  Site Map  |  Terms of Use  |  Write Us
All rights reserved. AI Website Builder | Free AI Website Builder | AI Website Maker | AI Website Generator | AI web design generator