Is there a solution for query string in the url for higlight

Having problems with DHTML Menu? There is usually somebody here who knows the answer.
Post Reply
voidian
Beginner
Beginner
Posts: 7
Joined: Wed Jun 13, 2007 4:35 pm

Is there a solution for query string in the url for higlight

Post by voidian »

Hi, I tried looking for a solution to the problem regarding query strings in the url and keeping the menu item highlighted, but have not found a working solution yet.

Does anyone have a way to strip the remainder of a querystring, prior to milonic reading the whole url in order to make the url match the menuitem?

I'm currently building the menu data from a sql database and adding the appropriate PageID=## in order to use that Page Id for other things. So, the first Query string actually matches what gets loaded into the milonic data for the menu.

example:
this does highlight in the menu
http://localhost/cedar/dev/classes.php?PageID=32
this does NOT highlight in the menu
http://localhost/cedar/dev/classes.php? ... signup=YES
voidian
Beginner
Beginner
Posts: 7
Joined: Wed Jun 13, 2007 4:35 pm

Re: Is there a solution for query string in the url for higlight

Post by voidian »

I don't know if this is the "BEST" method, but I found that if I split _Lhr prior to drawing the menu, I can remove the trailing variables from the querystring.

var myString = _Lhr;
var mySplitResult = myString.split(\"&\");
_Lhr = mySplitResult[0];

For other folks, it might be useful to split at the "?" in order to remove the entire query string.
Post Reply