highlight main nav items

Having problems with DHTML Menu? There is usually somebody here who knows the answer.
Post Reply
trent
Beginner
Beginner
Posts: 4
Joined: Tue Sep 23, 2003 1:59 pm

highlight main nav items

Post by trent »

I have a menu with five items. On say NAV item four I have no subnav items but on the page that it calls I have sub pages to call that are within the page, How can I highlight nav item four while the user is calling some of the page items. The pages called will be in the same directory as Nav item four if that helps.

regards


trent
User avatar
Hergio
Milonic God
Milonic God
Posts: 1123
Joined: Wed Jun 12, 2002 7:46 pm
Location: Rochester, NY

Post by Hergio »

I dont quite understand what you are trying to do. Do you have a URL we could look at?
Dave Hergert
Software Engineer
"Helping to make the menu better, one :?: at a time."
trent
Beginner
Beginner
Posts: 4
Joined: Tue Sep 23, 2003 1:59 pm

Post by trent »

No I don't have a url at this point in time,
Refering to my previous example. on the page that is called from Nav item four there is a list of generated pages. Can I when calling the items on this page still have nav item 4 highligted as the current site section.
Does that clarify it any further.

cheers

trent
User avatar
John
 Team
 Team
Posts: 5967
Joined: Sun May 19, 2002 8:23 pm
Location: Phoenix, AZ
Contact:

Post by John »

I'm having trouble understanding this one, too (which is why I didn't try to answer it last night!). However, if you're saying sub4 from your main menu will call a page, then that called page has other links that can be hit, and when that happens you want the highlight to remain on your main menu, the answer is no. The reason is that the page you are on needs to match the URL of an item in the menu code.
John
trent
Beginner
Beginner
Posts: 4
Joined: Tue Sep 23, 2003 1:59 pm

Post by trent »

yes that is what I want, thanks for your answer

trent
User avatar
Hergio
Milonic God
Milonic God
Posts: 1123
Joined: Wed Jun 12, 2002 7:46 pm
Location: Rochester, NY

Post by Hergio »

whew, thanks John. I was like 8O uhhh...out of it.
Dave Hergert
Software Engineer
"Helping to make the menu better, one :?: at a time."
User avatar
John
 Team
 Team
Posts: 5967
Joined: Sun May 19, 2002 8:23 pm
Location: Phoenix, AZ
Contact:

Post by John »

Well, it took me a day to figure it out, too...
John
User avatar
kevin3442
Milonic God
Milonic God
Posts: 2460
Joined: Sat Sep 07, 2002 12:09 am
Location: Lincoln, NE
Contact:

Post by kevin3442 »

I'd say that you could simulate the desired behavior in various ways. If the additional pages are, in fact, separate pages, then each one will have to load the menu scripts to display the menu. There are various ways you could apply the highlight color manually to the pertinent main menu item when the page loads... e.g., generating the menu code dynamically using server side scripting, setting a global js flag early in the page then using it in a conditional to specify colors, onclass/offclass, etc. in your menu_data.js.

Just a couple of thoughts,

Kevin
Post Reply