Random loss of background color in menu items.

Having problems with DHTML Menu? There is usually somebody here who knows the answer.
Post Reply
Crimson
Beginner
Beginner
Posts: 8
Joined: Wed May 21, 2003 6:48 pm
Location: Phoenix, AZ
Contact:

Random loss of background color in menu items.

Post by Crimson »

http://www.n00bstories.com/image.view.php?id=1314000745

That's a screen shot of the problem. It will show the image within the site design that's having the problem.

Some people tell me that it shows up when they are new visitors. For me, I get it randomly even when I'm logged in.

Maybe it's a caching problem? I don't know. But it's important for me to figure it out... especially since I bought a license for these menus even though I make no profits. :)

Anyway, if anyone has seen this and knows the cause, I'd love to know about it, thanks. :)
User avatar
Hergio
Milonic God
Milonic God
Posts: 1123
Joined: Wed Jun 12, 2002 7:46 pm
Location: Rochester, NY

Post by Hergio »

Ok lets see here..I actually had the problem happen to me the first time I loaded the page too. interesting. When I cleared my history and my cache, it happened again. Seems like when its cached it works...hmm.

First off, I would change the name of your one style from 'Style' to something alittle different, like 'subStyle'. Therefore eliminating that as a problem. I don't know exactly how the menu parses things up and what keywords are forbidden, but playing it safe is always the best option.

Second, fontstyle is defined in the quickhelp guides as :
fontstyle - Sets the Font Style for any global menu style. Valid font styles are normal or italic.
You have yours set to 10pt in both styles, change that to one of the acceptable options.

In your main menu you have the first item text followed by a bunch of non-breaking spaces. Just to you know, that is not necessary. There is a menu-level option called itemwidth that will set the size of your entire menu to a desired width, I would recommend that over the non-breaking spaces.

I did not see any other glaring problems, but try fixing these and we'll go from there.
Dave Hergert
Software Engineer
"Helping to make the menu better, one :?: at a time."
Crimson
Beginner
Beginner
Posts: 8
Joined: Wed May 21, 2003 6:48 pm
Location: Phoenix, AZ
Contact:

Post by Crimson »

ARGH -- It's my problem. When the problem occurs, the color variables aren't defined in the code. See, when you register to use the site, there are themes available (two at the moment). The theme you want is stored in a cookie. When you have no cookie for the site, my menu_data.js.php doesn't know which style you want.

Code: Select all

<?
switch($HTTP_COOKIE_VARS['style']) {
//SNIP
	case "gdi":
	default:
	$color1="#909090";
	$color2="#004000";
	$color3="#808040";
	$color4="#004000";
	$color5="#666699";
	$opacity="98";
	break;
}
?>
I just made "gdi" style the default which is how it is at the moment anyway and now it works. When you first load the page, if you don't have the "style" cookie defined, you're given the "gdi" setting. But of course on your first page load, you wouldn't have the cookie sent to the server yet.

:D

OK, but at least I learned about the itemwidth attribute. I was trying to find something like that but I didn't know what was available so I resorted to the clumsy solution of non-breaking spaces.

Is there a list anywhere yet of all those attributes we can use in the aI() function and the menu-level??

Thanks again for getting me in the right direction.

Christine
User avatar
Ruth
 Team
 Team
Posts: 8763
Joined: Thu May 15, 2003 5:02 am
Location: Yucaipa, CA
Contact:

Post by Ruth »

There are a whole bunch of docs with the various properties that come with the menu, and there are a number of links for samples, I guess listed here by John [jgillet] http://milonic.com/forum/viewtopic.php?t=2981

:) Ruth
Post Reply