Problem with 'pagecolor'

Having problems with DHTML Menu? There is usually somebody here who knows the answer.
Post Reply
pscs
Advanced
Advanced
Posts: 15
Joined: Tue Sep 23, 2003 10:51 pm
Location: Huddersfield, UK

Problem with 'pagecolor'

Post by pscs »

If I have two menu items with similar URLs

eg

aI("text=Maps;url=maps.html;");
aI("text=Other Maps;url=other_maps.html");

Then, if I go to the 'other_maps.html' page, the page coloring is triggered on both the 'Maps' and 'Other Maps' items

Paul[/b]
User avatar
Hergio
Milonic God
Milonic God
Posts: 1123
Joined: Wed Jun 12, 2002 7:46 pm
Location: Rochester, NY

Post by Hergio »

This would be because there is a javascript function which the menu utilizes in this case called match(). What it does is searches for an occurrance of a string anywhere within another string. So what its doing is taking the url, maps.html, and finding it the menu item maps.html as well as the menu item other_maps.html. Because the second URL technically does contain the first one.

I just re-created the scenerio over on my dev machine with the same names and such and it worked fine, it didnt color them both when I was viewing maps.html. I am using RC10, and thats not even the latest version. Upgrade to RC11 and that should solve your problem.
Dave Hergert
Software Engineer
"Helping to make the menu better, one :?: at a time."
pscs
Advanced
Advanced
Posts: 15
Joined: Tue Sep 23, 2003 10:51 pm
Location: Huddersfield, UK

Post by pscs »

This was with RC11...

I've tried it on both IE6 and Opera 7 and I get the same problem.

Is there anywhere I can email the full menu to so you can try with that?

(I could open a support issue if you want as we've got a corporate licence, but I prefer to do things in open forums if possible, so other people who may have the problem later can find it)
Paul Smith
User avatar
Hergio
Milonic God
Milonic God
Posts: 1123
Joined: Wed Jun 12, 2002 7:46 pm
Location: Rochester, NY

Post by Hergio »

Sure email me it, using the Email Link below all my posts. You can either send me a URL or the code itself. We should be able to nail the problem down pretty quick. I'll keep an eye out for your email....put milonic somewhere in the subject line.
Dave Hergert
Software Engineer
"Helping to make the menu better, one :?: at a time."
Post Reply