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

Multiple Relative-Positioned menus in one page


Poster: wolf8769
Dated: Wednesday March 10 2004 - 14:33:09 GMT

Excellent menu system, excellent support forum. Thanks! I'm a proud licensed user, by the way.

I am using the menu system to create a vertical menu along the left edge of the page. I have other HTML content above and below the menu, so although I could absolute position the menu, it flows better using relative positioning in that table column. Love the menu, love the flexibility -- so far, everytime I'm asked to make a tweak, the Milonic menu system allows me to accomodate. Now I have one that has me stumped.

I need to create a 2 part menu where I have some options at the top of the column, followed by some of my own HTML content, then below that, a second menu with some more options.

I see how I can create multiple menus using absolute positioning, but how can I create 2 seperate menus using relative positioning? I've read the previous threads here in the forum, and it did not appear to me those suggestions would apply.

Thanks!


Poster: John
Dated: Wednesday March 10 2004 - 15:20:18 GMT

Not seeing your code I don't know how you have things laid out. However, try putting the 2 menus (_data) in separate files, and then place the JS calls to those inside the appropriate <td>s where you need the menus located.
wolf8769 wrote:
Excellent menu system, excellent support forum. Thanks! I'm a proud licensed user, by the way.

Excellent :!: :D


Poster: Maz
Dated: Wednesday March 10 2004 - 15:51:32 GMT

Yep John,

I guess there would be 2 ways of going about it.

1. One menu-data.js up with script files and put the necessary code in the table.

2. separate menu-data.js script lines inserted into the table.

I doubt anyone knows what works best.

maz


Poster: wolf8769
Dated: Wednesday March 10 2004 - 17:44:14 GMT

The issue doesn't seem to be whether to have the menus defined in one or seperate .js files (I've tried working with both models.) It is that when you make the call to drawMenus(), it will draw ALL menus. Since I'm using relative positioning, that call draws both my menus the first and second time it is called -- the second call removes what was written the first time, so I end up with both menus flowing where I wanted the second menu to appear.

So my next thought was to structure drawMenus() to accept a main menu name as an argument, then it draws only that structure. But I don't want to mess with the core Milonic code. I want to stay in the customization boundaries defined by Milonic. Not to mention I'd probably get lost in the code and screw it up anyway. If I do go in, I'm leaving a rope tied to my ankle.

Any suggestions? I'd love to give you a link to see my system, but it's on a private Intranet and contains confidential info. I could of course take the time to build a public sample of what I'm trying to do --- would take a bit of time. But if needed, I'll do it. I just figured I wasn't the first to ask this so hoped there would be some readily available wisdom.

Thanks for the quick responses! Wow!


Poster: wolf8769
Dated: Thursday March 11 2004 - 21:30:25 GMT

maz wrote:
2. separate menu-data.js script lines inserted into the table.

maz


Maz, did what I explain make sense? Even if I create 2 seperate menu-data.js files, and insert them in different places, any call to drawMenus() will draw all menus in all menu-data files. The drawMenus() function is not specific to any set of menus.

Anyway, if the problem is not understood, please let me know. I can create a sample, but if you understand the problem, this is not necesary. :)


Poster: Maz
Dated: Friday March 12 2004 - 0:31:40 GMT

I'm really not sure if I can help, you are pointing out a problem that maybe only Andy can answer.

oh wait a minute, did you give new names to each menu? and if they have different menu styles they need new names also.

Here's a simple way to test this, write up two menu_data.js like data1 and data2. Then check that both files have completely different menu name and style names. Like where it says mainmenu and the style=

In one table place <script>....menu_data1.js</script>
In table 2 place <script>...menu_data2.js</script>

Now everything is separate with separate calls.

Should work.

maz


Poster: wolf8769
Dated: Friday March 12 2004 - 1:24:07 GMT

That doesn't work. Problem is, you don't get to name your overall menu group. You get to name each menu, but all the menus--no matter how many or how many seperate js files you have them in--all get drawn by one single call to drawMenus().

At least this is my experience with the system so far. Thanks for your efforts, Maz. I hope Andy will have time to give us a definitive reply.

Again, can't say enough good things about the Milonic menu code. I've used a lot of the popular dynamic menu systems, and Milonic is easily the best and easiest to use.


Poster: Andy
Dated: Friday March 12 2004 - 12:17:33 GMT

What you'll need to do is seperate the relative menus from the absolute menus and put them in 3 different batches.

By this I mean, declare all of your sub menus at the top of the page, then you can add the relative menus later on. Each batch of menus will need their own drawMenus() command.

The demo at http://www.milonic.com/menusample9.php does have updated instructions with a template that you can follow.

If this isn't what you are looking for and if it doesn't help. Get a demo put together and I'll make the adjustments for you.

Cheers
Andy


Poster: wolf8769
Dated: Friday March 12 2004 - 15:04:34 GMT

Thanks, Andy! Following the example, I got my 2 relative-positioned menus working the way I want. I'm not clear why this method works and the method of having 2 seperate menu data js files did not -- seems it's really doing the same thing. BUT, I don't stop to question these things! I must continue with development. Thanks for getting me over this hurdle.

I'm spreading the word -- Milonic is THE DHTML menu system.


Poster: John
Dated: Saturday March 13 2004 - 1:04:17 GMT

wolf8769 wrote:
I'm spreading the word -- Milonic is THE DHTML menu system.

Thanks very much! We'll take all the help and support we can get.

Most appreciated :!: