I can't seem to figure out how to keep last clicked item in my menue script marked.
Return to Recent Questions
Q:
I can’t seem to figure out how to keep last clicked item in my menue script marked.
I use these options:
pressedItem = -1
var saveNavigationPath = 1;
Where and how do I determine the backcolor of thepressed item?
I also have the same problem on DHTML Tree.
A:
The menue script has only two states normal and mouseover.
Try to do the following things:
- delete var pressedItem=1; parameter from your data file
- set correct parameter on each page before you call data file, for
example:
<noscript><a href="http://dhtml-menu.com">Menue script by DHTML-Menu.com</a></noscript>
<script type="text/javascript">var dmWorkPath = "menudir/";</script>
<script type="text/javascript" src="menudir/dmenu.js"></script>
<script type="text/javascript">var pressedItem=3;</script>
...
<script type="text/javascript" src="menudir/data.js"></script>
You can also set a pressed item using Javascript API:
function dm_ext_setPressedItem (menuInd, submenuInd, itemInd, recursion)
Sets a current pressed item.
menuInd - index of a menu on a page, >= 0.
submenuInd - index of a submenu, >= 0.
itemInd - index of an item, >=0.
recursion = true/false - highlight parent items.
But notice, to use dm_ext_setPressedItem() you should know ID of selected item and subitem.
You can't get this ID after you reload your page.
That is why you should write your own code on PHP.
Return to Recent Questions
Related:
- March 18, 2009 - I am getting a Javascript error, when accessing any of the menue script.
- Apr 04, 2009 - Is there a way to have an automatic line-break for large submenu items in menue script?
- Apr 21, 2009 - If your menue script supports key navigation, like Alt-F to select a menue script?
- May 09, 2009 - Obviously your menue script are NOT cross browser usable...
- May 25, 2009 - How can I setup size and color of the font for individual button in the menue script?
- Jun 12, 2009 - Is there a way to use smartscrolling function for the top menue script?
- Jun 28, 2009 - Does your effective website navigation allows to keep the pressed menu-item hightlighed?
- Jun 29, 2009 - I do not understand how to use your menue script in cross frame mode
- Jul 17, 2009 - This menue script works great in IE, but doesn't work in Firefox.
- Aug 02, 2009 - Why my menue script does not float and why I cannot centre the menue script?
- Aug 20, 2009 - How can I open a new window of a specific size in the menue script?New Window with Specific Size in Menue script
|