can't get onClass, offClass to work

Having problems with DHTML Menu? There is usually somebody here who knows the answer.
Post Reply
dbonneville
Advanced
Advanced
Posts: 22
Joined: Wed May 05, 2004 8:33 pm

can't get onClass, offClass to work

Post by dbonneville »

Hi:

I can't get this to work for some reason. The menu is transparent, with only the black text showing up. What am I doing wrong?

I have this defined in the menu_data.js

Code: Select all

with(mainMenu=new mm_style()){
//onbgcolor="#C7CCCD";
//oncolor="#000000";
//offbgcolor="#C7CCCD";
offcolor="transparent";
//bordercolor="#BFBFBF";
//borderstyle="raised";
//borderwidth=2;
//separatorcolor="#C7CCCD";
separatorsize="2";
padding=4;
fontsize="8pt";
fontfamily="arial";
onclass="navMainOn";
offclass="navMainOff";
}

Here are my classes:

Code: Select all

.navMainOn {
	border-top-width: 1px;
	border-right-width: 1px;
	border-bottom-width: 1px;
	border-left-width: 1px;
	border-right-style: solid;
	border-left-style: solid;
	border-top-color: #8D999A;
	background-color: #EBEDED;
	border-right-color: #8D999A;
	border-bottom-color: #8D999A;
	border-left-color: #8D999A;
}
.navMainOff {
	border-top-width: 1px;
	border-right-width: 1px;
	border-bottom-width: 1px;
	border-left-width: 1px;
	border-right-style: none;
	border-left-style: none;
	border-top-color: #8D999A;
	background-color: #C7CCCD;
	border-right-color: #8D999A;
	border-bottom-color: #8D999A;
	border-left-color: #8D999A;
	border-bottom-style: solid;
}
Thanks!
User avatar
Ruth
 Team
 Team
Posts: 8763
Joined: Thu May 15, 2003 5:02 am
Location: Yucaipa, CA
Contact:

Post by Ruth »

It would be easier to check everything with a link, however.... Remove the offbgcolor="transparent" since you have a color listed in you class. I have no clue as to how you're calling your style so I can't tell if there's an error in that. Try putting the classes in the head section with a style tag and see if that works. It did for me.

Ruth
dbonneville
Advanced
Advanced
Posts: 22
Joined: Wed May 05, 2004 8:33 pm

Post by dbonneville »

I'm behind a firewall and have no ftp to the outside world, but I can paste code.

I'm calling the classes externally BEFFORE the js files, like this:

Code: Select all

<html>
<head>

	
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<link href="styles.css" rel="stylesheet" type="text/css">

<SCRIPT language=JavaScript src="milonic_src.js" type=text/javascript></SCRIPT>	
<script language=JavaScript src=mmenudom.js type=text/javascript></script>
<SCRIPT language=JavaScript src="menu_data.js" type=text/javascript></SCRIPT>	

</head>
<body>.....(etc)
Is that not right? I'll try them in the page. Does it matter where they are - before or after the js file calls?
User avatar
Ruth
 Team
 Team
Posts: 8763
Joined: Thu May 15, 2003 5:02 am
Location: Yucaipa, CA
Contact:

Post by Ruth »

Yes, it should work calling an external style sheet. I just suggested trying them in the head to test. If they work there and not when the style sheet is called perhaps there's some other problem? I place the menu calls the last item in the head section, personal preference, and I'm not sure if there's a reason to put them last. :)

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

Post by John »

Fron your menu calls I have to assume you are certain that nobody will be using your site with any NS browsers at all, correct? If not correct, then your menu calls are wrong.
John
dbonneville
Advanced
Advanced
Posts: 22
Joined: Wed May 05, 2004 8:33 pm

Post by dbonneville »

Even 7.1 and FireFox and Mozilla? Or do you mean old Netscape, like 6 and previous (4.x)?

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

Post by Ruth »

The 4x browsers which need the mmenuns4.js to call the menu for them.

Ruth
Post Reply