Do Milonic Menus do this?

Having problems with DHTML Menu? There is usually somebody here who knows the answer.
Post Reply
ShoTaker
Beginner
Beginner
Posts: 1
Joined: Mon Dec 08, 2003 7:06 pm

Do Milonic Menus do this?

Post by ShoTaker »

Hello everyone. I was wondering if the Milonic Menu system does what I have mocked up on the link below.

Basically, what I'm trying to do is create a drop down layer that encompasses more of the screen. It would also contain form fields, etc. The menu would drop down when someone puts their mouse over the navigation option, and go away onMouseout of the layer.

Image
RichGags
Beginner
Beginner
Posts: 6
Joined: Mon Dec 08, 2003 10:50 pm

Post by RichGags »

Wow, that would be nice. Hopefully it does do that.
User avatar
kevin3442
Milonic God
Milonic God
Posts: 2460
Joined: Sat Sep 07, 2002 12:09 am
Location: Lincoln, NE
Contact:

Post by kevin3442 »

Have you tried generating the html that you would use in your popdown layer, then putting it in the text= parameter of an aI() menu item definition?

Kevin
squills
Beginner
Beginner
Posts: 7
Joined: Fri Nov 21, 2003 11:55 am
Location: Manchester, UK

Re: Do Milonic Menus do this?

Post by squills »

Did anyone find out if this worked? Too lazy to try it out myself! ;)
User avatar
Andy
Milonic
Milonic
Posts: 3308
Joined: Sun May 19, 2002 8:23 pm
Location: Menu Developer
Contact:

Post by Andy »

From the above I'm seeing a tabbed like system, like what MS Windows has.

Is this what you are looking for?

Cheers
Andy
squills
Beginner
Beginner
Posts: 7
Joined: Fri Nov 21, 2003 11:55 am
Location: Manchester, UK

Post by squills »

Yes, I guess so. It could be a great shortcut for me if it worked.
pez
Beginner
Beginner
Posts: 6
Joined: Tue Dec 30, 2003 1:20 am

Post by pez »

You can do above as long as all quotation marks are escaped and all code is on one line...Just tried it with a form for submitting email with links and radio buttons
Also remove the URL link for the menu item otherwise as soon as a user clicks on menu ?

aI("text=Add your html jscript here;url=http://www.getridofthis.com;status=Contact Page;");


aI("text=<table><tr><td class=\"can-use-stylesheets\">Enter Email</td><td><form...lots of fancy stuff...></td></tr></table>;;status=Contact Page;");

works fine

MY QUESTION
I'm actually trying to change the menu colour according to a cookie set by a user.. Can do this with the rest of the site through css style sheet with php.
But can't find a way to change milonic menu... dont want to have to create separate menu-data.js files would prefer to read from a css style sheet.
Apart from doing it like the above can this be done another way??
Can I call menu colours etc from a css style sheet?
How?
Thanxs
User avatar
kevin3442
Milonic God
Milonic God
Posts: 2460
Joined: Sat Sep 07, 2002 12:09 am
Location: Lincoln, NE
Contact:

Post by kevin3442 »

pez wrote:MY QUESTION
I'm actually trying to change the menu colour according to a cookie set by a user.. Can do this with the rest of the site through css style sheet with php.
But can't find a way to change milonic menu... dont want to have to create separate menu-data.js files would prefer to read from a css style sheet.
Apart from doing it like the above can this be done another way??
Can I call menu colours etc from a css style sheet?
How?
You could use the offclass and onclass properties. These can be defineed as either menu style properties or as individual menu item properties (overriding the menu style setting if present). The general idea is to define the styles in your .css style sheet, like so:

Code: Select all

.menuOff
{
  style definitions
}

.menuOn
{
  style definitions
}
Then use them like so:

Used in a menu style definition:

Code: Select all

with(mainMenu=new mm_style()){ 
.
.
.
offclass="menuOff"; 
onclass="menuOn"; 
.
.
.
}
Used in a menu item definition

Code: Select all

aI("text=Item Text;url=whatever.htm;offclass=menuOff;onclass=menuOn;");
You may still want to set the basic menu style properties in the menu style definition, like offbgcolor and onbgcolor, etc., because NS4 will not be able to use the offclass and onclass properties. Although, to be honest, I don't know if offclass/onclass take precedence over the menu's internal style settings or vice versa; you might want to test this if you care about NS4.

A third property, pageclass, will let you specify styles for a "current page" highlight in the menu.

Now that you know the names of the properties (offclass, onclass, pageclass), you can find a lot more discussion about them using the forum's searach function.

Hope that helps,

Kevin
User avatar
Hergio
Milonic God
Milonic God
Posts: 1123
Joined: Wed Jun 12, 2002 7:46 pm
Location: Rochester, NY

Post by Hergio »

Using javascript you can pull up cookie's values and then based on that you can set variables (whether it be class names or styles like colors and what not) and then in your menu definitions you would put that javascript variable that you set based on the cookie value in.

And regarding the big tabbed interface. I know this menu has ALOT of functionality over and above just a hierarchial menu. It utilizes alot of good things. But you may be better of coding this yourself. I would create a big DIV in your code with all of the stuff you want in it (you dont have to escape things, it can all be straight HTML). And then set this DIV's visible property to hidden and position is as you like. You would then create a javascript function to show/hide the div. And the links at the top of the page would have their onMouseOver show the DIV. And the DIV itself would have a onMouseOut function to hide itself. The menu is really doing all this too but creating it all with javascript. To put ALL that stuff into the aI call and make sure its escaped correctly and is on one line can be error prone, but as the person above mention, it CAN be done.
Dave Hergert
Software Engineer
"Helping to make the menu better, one :?: at a time."
Post Reply