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

Menu help


Poster: Noodles22
Dated: Monday August 25 2003 - 3:11:57 BST

Hi, I'm trying to use text links as the top level of my menu using version 5, the example on the milonic site with text links as the top level uses a top and left parameter.

Unfortunately I'm trying to stay away from using a left parameter as my table is centered and if i change my resolution then the menu should move.

So i'm trying to do a cross between the table bound menu and the text top level one, but so far i haven't had much luck with it. Does anyone know how to do this?


Poster: Hergio
Dated: Monday August 25 2003 - 16:06:05 BST

http://www.milonic.com/menusample.php?sampleid=4 shows how you can make the menu appear wherever the mouse is, so if your menu items move, no matter where they are, the menu will pop up at the mouse when you go over them.

The other option, make your table as normal with your cells along the top...then give the table a second row, only 1px high. This will essentially give you a table with all your menu headers/links with a cell below each one thats 1px high. In these 1px high cells, table bound the menu whose show-on-mouse-over link is directly above it (use the table bound example for how to do that). Then the menu item above it should have a mouseover function of popup('menuBelowMeName') and this way, you can have your menu items as text and still have the menus themselves table bound to cells that will move with the resolution. Plus bounding them to the cell directly below the link will make them appear below the link and not over top of it since it will bound to the upper left corner of the 1px cell.

Hope you understand what I am saying, and let us know if it works! ;)


Poster: Noodles
Dated: Monday September 8 2003 - 6:04:02 BST

I had a bit of a play around with it, couldn't quite get what you were talking about, do you think you could give me an example?

Thanks heaps :)


Poster: Hergio
Dated: Monday September 8 2003 - 13:23:47 BST

Code:
+---------+----------+----------+----------+----------+
| item1   | item2    |  item3   |  item4   |  item5   |   \
|         |          |          |          |          |   15px
+---------+----------+----------+----------+----------+   /
|  menu1  |  menu2   |    ...   |    ...   |    ...   |   } 1px
+---------+----------+----------+----------+----------+

Inside of the cell marked menu one, you put the actual menu definition for menu1 (set its positioning to relative so its bound to the table and set it to not be visible) inside the TD tags between SCRIPT tags. Then in the cell marked item 1, put a onMouseOver="popup(menu1);"

Get what I'm saying?

Has anyone implemented this?


Poster: Drew99
Dated: Friday October 3 2003 - 17:01:39 BST

Has anyone implemented this? I have this set up and it works on IE and NS 6, but NS 4 sets all the menus in the upper left corner of the screen.

In the cell below menu item 2, I have:

with(milonic=new menuname("menu2")){
style=menuStyle;
overflow="scroll";
alwaysvisible=0;
position="absolute";
aI("text=Menu 2;url=menusample.php?sampleid=1;");
aI("text=Vertical Navigation Bar;url=menusample.php?sampleid=2;");
aI("text=Static HTML Object Based;url=menusample.php?sampleid=3;");
aI("text=Image Map Sample;url=menusample.php?sampleid=4;");
aI("text=Multiple Styles;url=menusample.php?sampleid=5;");
aI("text=Multiple Properties;url=menusample.php?sampleid=6;");
}

IE correctly figures out that the menu should be drawn absolutely to the cell, but NS 4 draws it absolutely to the upper left corner of the screen.


Poster: Hergio
Dated: Saturday October 4 2003 - 20:58:08 BST

Wow thats the first I've heard if my method worked, and it did, great! I mean, of course it did, I knew it all along. :D

Umm, this MAY try it, you usually shouldnt do this, but lets give it a shot since the first time around I gave you a crazy idea and it worked. Take out the code for those menus in the Menu1, menu2 cells and actually physically place them inbetween the <td>'s of those cells between script tags. So each cell would have its own
<td><SCRIPT>with(milonic...menuX.....</SCRIPT></td>
and so on in each cell. And remove the drawMenus() call at the bottom of your menu_data file.
Once you've got all the menu declarations in each td cell, at the bottom of your page, before </body> put <SCRIPT>drawMenus();</SCRIPT>
This may get netscape to draw the menu in the upper left hand corner of the cell you've physically placed it in. And hopefully it wont break IE. Give it a shot, hope this works! (man I hate netscape sometimes)


Poster: John
Dated: Sunday October 5 2003 - 18:28:24 BST

Hergio wrote:
(man I hate netscape sometimes)

You do, of course, mean all the time - right?


Poster: Hergio
Dated: Monday October 6 2003 - 2:30:06 BST

Ooops, great catch there John. Oh so true. All the time. :lol:


Poster: Drew99
Dated: Monday October 6 2003 - 22:35:00 BST

I put the menu code in between the <td> and </td> and added the <SCRIPT>drawMenus();</SCRIPT> to the end of the page. On IE it draws the menus appearing at the end of the page.

If I draw the "parent menu" in each cell (let Milonic's javascript generate the top level menu), then Netscape draws the submenus properly attached to the correct cell.

However, I'd rather draw teh "parent menu" myself in HTML, and let Milonic handle only the dropdowns.

So Milonic + NS4 knows how to properly place the dropdowns when Milonic generates the whole menu - but when Milonic only generates the dropdowns, the location information gets lost.

Hergio, does this give you any new ideas? I wonder if there is a way to let NS4 know the correct placement for the submenus since Milonic is able to do it when it generates the root level menu via javascript.


Poster: John
Dated: Monday October 6 2003 - 22:39:10 BST

RC15 was posted a short time ago. While mostly for NS6/7 problems, maybe there's something in there that might help you out. Give it a try.


Poster: John
Dated: Monday October 6 2003 - 22:49:59 BST

I have a site at http://westcgi.west.asu.edu/sai/ that I think does what you're looking for. It is NOT built for NS4.x, so if you look at it in that 'wonderful' browser don't be surprised.

However, the main menu items are graphics (called, but not generated, by the menu system), with the subs done by Milonic and dropping where they are supposed to.


Poster: Hergio
Dated: Tuesday October 7 2003 - 2:18:56 BST

Yeah now I see the way Netscape sees it...you declare the menus and whereever the placeMenu call is is where it seems to think a menu that is set to absolute should go. Hmm. I would go back to the old method and upgrade to the latest and greatest. That may fix up your problem. If it doesn't I have yet another crazy idea. But I ain't sayin unless the other option doesn't work. :}