IMPROVED:

Please note that official support for this menu version has now ceased. There are still plenty of users, though, and the forum is still running. Some of our long-time users may be able to help you out.
Post Reply
nstohler@madtoaster.com
Beginner
Beginner
Posts: 2
Joined: Sun May 19, 2002 7:23 pm

IMPROVED:

Post by nstohler@madtoaster.com »

Hello

The menu is great! One that isn't perfect in my opinion in the current release is the "last menu item clicked"-feature, which uses cookies to hilight the last clicked item. This doesnt work, if the user comes directly to a page (without clicking on an item) or uses the back-button.

So, I did some coding, and came up with the following solution:

===================
menu_array.js :
----------------------------------
[...]

//////////////////////////////////
// Editable properties END here //
//////////////////////////////////

//-------------------------------------------
// code inserted by nicolas stohler
var mpUrl2Nr = new Object();
var nNr = 0;
for( var i in menus )
{
var j = 23; // url item
while( typeof menus[j] != "undefined" )
{
var s = j;
if( menus[j].indexOf("show-menu") != -1 ){ s ; }
if( menus[s].length > 0 ){ mpUrl2Nr[menus[s]] = "smenu=" nNr "#"; }
nNr ;
j =5;
}
}
for( var i in mpUrl2Nr )
{
if( document.location.href.indexOf(i) != -1 )
{
var sCurPage = mpUrl2Nr;
break;
}
}
// end of code insert
//-------------------------------------------

dumpmenus() // This must be the last line in this file



===================
mmenu.js :
----------------------------------
a)
replace "tc=_d.cookie;" with "tc=GetPageId();"

b) add the function to the end of the file:
function GetPageId()
{return ( typeof sCurPage != "undefined" ? sCurPage : "" ) }


Ok, I hope you can include this in your next release (with an option wheter to use the cookie or the new feature...)

There's a little BUG i noticed: if a menu item that owns subitems gets hilighted, the hilighting works, but after I move the mouse over the item and out again, the hilighting is completely gone.

that's all
Nicolas
Post Reply