Highlight top nav

Having problems with DHTML Menu? There is usually somebody here who knows the answer.
Post Reply
perldev
Mega User
Mega User
Posts: 115
Joined: Thu Aug 26, 2004 5:23 pm
Location: Chicago

Highlight top nav

Post by perldev »

I have menu with page match set:
[pre]
Cat 1 Cat2 cat 3
link11 link21
link12 link22
[/pre]
Where item22 is linked to js: top.Replace('something').

When click on link22, I would like to see "Cat2" is highlighted. But the page match won't work. Is there any function I can call in page22 to force Cat2 highlighted?

Thanks.

PerlDev
User avatar
Andy
Milonic
Milonic
Posts: 3308
Joined: Sun May 19, 2002 8:23 pm
Location: Menu Developer
Contact:

Post by Andy »

There could be any number of reasons why the highlighting wont work.

As always, it will help if we can see the problem, a test URL will be of great help

Cheers,
Andy
perldev
Mega User
Mega User
Posts: 115
Joined: Thu Aug 26, 2004 5:23 pm
Location: Chicago

Post by perldev »

You may use milonic index page as an example: About Milonic >> About Us

change

Code: Select all

aI("text=About Us;url=/aboutus.php;image=/menuimages/18_about.gif;");
to

Code: Select all

function Replace(x){_d.location.href= (x==:junk")?"/aboutus.php":"#";}
aI("text=About Us;url=javascript:Replace('junk');image=/...");
When you click on "About Us", it won't be highlighted.
perldev
Mega User
Mega User
Posts: 115
Joined: Thu Aug 26, 2004 5:23 pm
Location: Chicago

Post by perldev »

Another example will be: page url doesn't exist in the top navigation (milonic dhtml menu); I need in the particular page to call a JS function if exists any, to highlight the top navigation.

Is there such a function?
perldev
Mega User
Mega User
Posts: 115
Joined: Thu Aug 26, 2004 5:23 pm
Location: Chicago

Post by perldev »

Menu data:

Code: Select all

with(style1=new mm_style()){
..
pagebgcolor="transparent";
pagecolor="#BB7D00";
subimage="/images/arrow.gif";
high3dcolor="#CCCCCC";
low3dcolor="#CCCCCC";
..
}

with(milonic=new menuname("m2")){
..
aI("text=Online Shopping;showmenu=m2")
..
}
with(milonic=new menuname("m2")){
itemwidth=230;
style=style1;
aI("text=Orders;url=javascript:parent.ReplaceMain('order');");
aI("text=Check Out;url=javascript:parent.ReplaceMain('checkout');");
..
}
The actual url of "Orders" is PlaceYourOrder.aspx; that of "Check Out" is CheckOutNow.aspx.

When I click on "Orders", neighther "Online Shopping" or "Orders" is hightlighted.

I tried itemOn( getMenuByName("m2") ), even it's not what I want, it's still not working...
Post Reply