Milonic provide full featured pull down web menus for some of the worlds largest companies
click here to see what it can do for you

Download Milonic DHTML Menu
Buy Milonic DHTML Menu

Back To Start Of Archive
Taken From The Forum: Help & Support for DHTML Menu Version 5+
Forum Topic: Click to view post
Last Updated: Saturday July 14 2012 - 06:07:29

can't get onClass, offClass to work


Poster: dbonneville
Dated: Thursday May 6 2004 - 20:36:47 BST

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:
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:
.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!


Poster: Ruth
Dated: Friday May 7 2004 - 3:08:30 BST

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


Poster: dbonneville
Dated: Friday May 7 2004 - 14:24:49 BST

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:
<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?


Poster: Ruth
Dated: Friday May 7 2004 - 17:29:40 BST

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


Poster: John
Dated: Friday May 7 2004 - 22:43:46 BST

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.


Poster: dbonneville
Dated: Friday May 7 2004 - 23:39:07 BST

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

Doug


Poster: Ruth
Dated: Sunday May 9 2004 - 22:12:45 BST

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

Ruth