match page URLs for Pagecolor

Having problems with DHTML Menu? There is usually somebody here who knows the answer.
Post Reply
User avatar
Hergio
Milonic God
Milonic God
Posts: 1123
Joined: Wed Jun 12, 2002 7:46 pm
Location: Rochester, NY

match page URLs for Pagecolor

Post by Hergio »

Here's a question for ya, and the only thing I can think of to fix it is a hack.
Basically on my site I have a bunch of links in the menu, but I am trying to record users click-throughs to determine the most popular links on the site (which I display in a 'most popular' section). Anyways, the urls to all these pages look like
url=/redirect.asp?URL=/dir1/happyPage.asp&Name=Happy%20Page;
url=/redirect.asp?URL=/dir1/sadPage.asp&Name=Sad%20Page;
the redirect page obviously updates a record in our DB about what page was clicked and then redirects the user to the URL specified; its seemless, they dont know it, dont see it. Great.
But I really like the pageColor attribute to show people where they are. But when they are at a page, they are at /dir1/happyPage.asp, not redirect.asp?URL=/dir1/happyPage.asp so the coloring doesnt work. Is there a way you can think of to make this work?
What I was thinking was instead of looking for the URL to be EQUAL to the menus url property to highlight it, use the javascript function MATCH which would return true if the current URL matched any part of the menu's url. Whaddya think? :)

P.S. Andy, where did the Milonic name come from? Thought it was your last name, but obviously not.
Dave Hergert
Software Engineer
"Helping to make the menu better, one :?: at a time."
Post Reply