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

Need BigPicture Conceptual Help!


Poster: mtnguy
Dated: Wednesday April 28 2004 - 5:10:11 BST

Discussion Mates:

I bought Milonic yesterday, and have managed to get the main left navigation on a test page up and running.
http://www.colodivorce.com/new.asp

I am reasonably literate about many webmastering issues, but new to javascript, and I HAVE read Ruth's fab 5/15/04 article on global styles, etc. Somehow your explanations don't fill in the big picture "this goes here and this goes there" issues. Maybe my questions would be of interest to others.

1. in Global Styles, it's true you can call em what you want but the ONLY piece of that first line code you can change is the "menuStyle" name that comes with the sample code. Right?
so can change the word menuStyle, but NOT the rest or

Code:
with(-------=new mm_style()){


part of that first line. I think your literature, especially Ruth's article is pretty clear on this style name question.

2. in Regional Styles, however, what part of that first line code can you change? Is the use of the word "milonic" in the sample code just what you chose to call your sample regional style, for example? OR is it integral to linking all other milonic scripts and making it all work? (like saying 'milonic menu system code')

Can you change ANY part of the sample menu regional style first line?

Code:
with (milonic=new menuname ("Main Menu")) {


Can you, for example, rename 'milonic' to 'mysite' 'new menuname' to 'left home page menu' or just the "Main Menu" phrase or can even that phrase be changed?

** a simple colored image of these two sections of code somewhat identifying what must be left alone, and what you can if you like customize would help many folks. (if I missed this help, I truly apologize.)

3. What about the menu_data.js script item itself?

I'm unclear whether can you create others (I saw the Ramco post) as long as you retain a portion of that name? what portion? (any name, as long as it starts with, or ends with 'data'? Or, can there only be one such file and this exact name must be kept.

4. Hugely related is how do you have several menus on a single page?
Do you place actual menu script in that spot on the page, or reference only a unique menu script (because you CAN rename menu-data.js and CAN have several) there. (Do you change the basic code following the body tag to include all script names, when you do this?)

In short, I get how to set the menu characteristics; it's pretty easy if you have played with CSS at all. I get you need that code pasted in the body, and even managed to put in a Frontpage shared border. But I haven't found an explanation of how you link changes, and what pieces of sample menus you can trash and what phrase words or file names are not to be tinkered with. I believe I know you ONLY mess with the non-data scripts if you are a script writer.

THANKS to anyone who takes time to direct me a bit. As you can see in a few hours, I was able to get a dummy page of my site working fine and looking fine (haven't decided on appearances yet, but mimics existing home page just fine). But I don't know how the parts fits together and what phrases are sacred code and what are just names I can change as long as I am internally consistent. If this is made clear somewhere, forgive me. I did some searching and have reread much of this several times.

What I want to do is have (in addition to the left nav menu in place on the "new" page, a separate right nav menu, and a tiny client menu at bottom left. So I need to know how to integrate 3 separate menus, etc.

Love the product; just need some big picture guidance!

Thanks all.

Mtnguy


Poster: Maz
Dated: Wednesday April 28 2004 - 6:32:46 BST

Hi,

You can rename menu_data.js anything, sometimes the js is changed to work with php.

With more than one menu, create a new menu in menu_data.js by giving it a new name.

For example I have a login menu and rename it like this

with(milonic=new menuname("login")){
style=xplogin;

up in styles I create a new style for this menu
with(xplogin=new mm_style()){

each one can be anything from a single link or with submenus by starting a new menu
with(milonic=new menuname("login2")){
style=xplogin;


where
showmenu=login2;

in the aI(
string

When you start changing things, its very easy to make a mistake and the menu won't show. Its best to copy what works, match the names and test it first and then start changing it slowly. If it goes wrong you can go back and try again to get it right.

Don't change the word Milonic and don't use it anywhere as a name or it might confuse the menu.

Let me know if you don't understand.
maz


Poster: mtnguy
Dated: Wednesday April 28 2004 - 15:31:21 BST

Thanks, Maz. :) Get much of that.

But my other question. Need 3 menus on homepage (not the 20 or so you have; wow!) I have one menu in one shared border include, need one in another and one in a footer. Right now I have the entire code

Code:
   <SCRIPT language=JavaScript src="../menu/milonic_src.js" type=text/javascript></SCRIPT>   
   <script   language=JavaScript>
   if(ns4)_d.write("<scr"+"ipt language=JavaScript src=../menu/mmenuns4.js><\/scr"+"ipt>");      
     else _d.write("<scr"+"ipt language=JavaScript src=../menu/mmenudom.js><\/scr"+"ipt>");
   </script>
   <SCRIPT language=JavaScript src="../menu/menu_data.js" type=text/javascript></SCRIPT>


in the first shared border include, so my "main menu" works fine.

1. Do I repeat all this in the other 2 places on the page where I want the separate menus? Or, just a piece of the menu_data.js relating to the specific menu I want in that secondary area? IN SHORT, how do I tell the code/computer to display in that area only the one non-main menu?

In fact, why does the "Main Menu" luckily appear in my first area? (nothing in the script pasted in that shared border references any particular menu; does it just default to the "Main Menu" that I've defined?)

So, still I don't know what tag in the spot in the page tells the script what menu to display there. I now take it you don't create separate menu scripts and then paste in the 4 lines above everywhere you need a menu (only changing the name of the menu data script). But how do you do this?

Thanks for your help. Once I understand how these pieces connect together, I will be able to do whatever wherever, but don't understand yet the relationship or identifiers that enable a particular area in a site to display something different than another.

Again, much thanks! Greatly appreciated.


Poster: John
Dated: Wednesday April 28 2004 - 15:54:43 BST

Maz definitely has you on the right track, and you're actually doing very well yourself in figuring things out. She's on-line right now, so I'll just stick a few things in here that I see.

You have a Main Menu because you have defined it...

with(milonic=new menuname("Main Menu")){ etc.

For additional menus on the same page just write call another menu_data2.js (or whatever name you like, different from any others, of course). It's not necessary to re-call the main menu files.

Try and leave any comments (//) out of the data files. Some browsers trip over them, even though they shouldn't.

Also, numeric parameters (e.g., subimagepadding="2";, etc.) do not need the "". So this one would be subimagepadding=2; .

I'd move the 3 main menu code calls out of the <td> and place them as the first items after <body>. Leave the _data call in the <td> where it is.

I'm sure Maz will have more.


Poster: mtnguy
Dated: Wednesday April 28 2004 - 19:06:44 BST

MAZ & John:

Thanks for the prompt and wonderful support. I'm getting it. Moved the first script lines to the page's code (before the body), and the last script line referencing one custom-named menu script to the first shared border, and all is fine.

So, I will now create a second custom-named menu script to the second shared border, a third to the footer, etc. Pretty easy once you understand what is the built-in "don't touch" framework pieces of the code are, and what you can tinker with, and how they connect in the page structure.

Thanks, and I will clean up those comments. They are just my working notes until I get this thing off the ground.

Sincere thanks for such immediate support. Hard to see how anyone can complain about support with the immediate help I've gotten on this Board! Looking forward to funning with combinations of color and design now.

Sincerely,

mtnguy :lol:


Poster: John
Dated: Wednesday April 28 2004 - 19:32:15 BST

mtnguy wrote:
MAZ & John:

Thanks for the prompt and wonderful support.

You're welcome.
mtnguy wrote:
So, I will now create a second custom-named menu script to the second shared border, a third to the footer, etc. Pretty easy once you understand what is the built-in "don't touch" framework pieces of the code are, and what you can tinker with, and how they connect in the page structure.

That's the ticket. The 3 main code files (milonic_src, mmenudom, and mmenuns4) are definitely off-limits. The _data file(s) is/are where you do all your tinkering, and can be renamed as you need (but not the other 3!).
mtnguy wrote:
Thanks, and I will clean up those comments. They are just my working notes until I get this thing off the ground.

Figured that based on what they said, but mentioned it only because apparently some browsers ignore the // .
mtnguy wrote:
Sincere thanks for such immediate support. Hard to see how anyone can complain about support with the immediate help I've gotten on this Board! Looking forward to funning with combinations of color and design now.

Thank you very much for the kind words. They are most appreciated.

Let us know if there's anything else.