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: Thursday February 8 2018 - 06:02:29

Help Check Menu Please...


Poster: whiskey3
Dated: Wednesday August 6 2003 - 18:49:00 BST

http://ww.moldex.com/new/navbar2/menu.htm

How do I remove the top arrows in my nav bar?
How do I also adjust the navbar so it appears at the top of the page?
Also if I use decide to nest this in a table will it always stay fixed in the table?


Poster: Hergio
Dated: Wednesday August 6 2003 - 20:47:13 BST

(1) You'll notice that you have one style defined in your menu.js file and all your menus use this style. That style has a attribute called "subimage" that contains the image of the arrow. Because all menus use this style, any menus that have a submenu use this very same arrow. What you need to do is create a 2ND style (copy and paste the original style if you want), with a different name and comment out the subimage attribute for that style. And then make your top most menu use the new style.

(2) Looking at your mainmenu2 menu, there is a attribute called "top" that you have commented out. Uncomment that and change it to, say 10, and it will move the menu to 10 pixels from the top of the browser window.

(3) Yes, if you bind the menu to a table, it will stay with the table. What would be the point of nesting it in the table? If you mean if the table changes size based on browser size, yes it should move to stay in the table...although submenus may extend out of the table, the top most menu will be bound to the table cell.


Poster: John
Dated: Wednesday August 6 2003 - 21:18:24 BST

Here's a corrected array to get you started, with a few added comments. Compare it to yours carefully...

Code: Select all

_scrollAmount=3      // Used for Netscape 4 scrolling
_scrollDelay=20        // Used for Netscape 4 scrolling

_menuCloseDelay=500  // The delay for menus to remain visible on mouse off
_menuOpenDelay=150   // The delay for opening menus on mouse over
//_followSpeed=5       // Follow Scrolling speed (higher number makes the scrolling smoother but slower)
//_followRate=40        // Follow Scrolling Rate (use a minimum of 40 or you may experience problems)
_subOffsetTop=10;     // Sub menu offset Top position
_subOffsetLeft=0;  // Sub menu offset Left position - YOU HAD -0, NOT SURE IF THAT'S VALID - CHANGED TO JUST 0


with(mainStyle=new mm_style()){
//     onbgcolor = "";  COMMENT OUT (OR DELETE) ITEMS YOU ARE NOT USING
       oncolor = "#0000ff";
    offbgcolor = "#ffffcc";
      offcolor = "black";  // YOU HAD "#black"; - THIS WAS MOST OF THE PROBLEM
//   bordercolor = "";  AS ABOVE
//   borderstyle = "";  AS ABOVE
//separatorcolor = "";  AS ABOVE
 separatorsize = 1;
       padding = 4
       //onborder="2px solid black"
      fontsize = "12";
     fontstyle = "normal";
    fontweight = "bold";
    fontfamily = "verdana, arial";
   high3dcolor = null; // Not sure if this will be included in final release
    low3dcolor = null; // Not sure if this will be included in final release
     pagecolor = "purple";
   pagebgcolor = "pink";
   topbarimage = "images/arrow_down.gif";
topbarimageloc = "center;middle"
      subimage = "images/arrow.gif";
   subimageloc = "center;middle"
  //ondecoration = "underline"
  //onbold = true;
  //onitalic = true;
}

with(milonic=new menuname("mainmenu2")){_c=1
top = 10;  //REMOVE COMMENT FROM THIS LINE (top) AND SET TO YOUR NEEDS
//left = 3;
//itemwidth=60
//menuwidth="99%";
borderwidth = 1;
screenposition = "center";  // REMOVE ;middle
//alignment="center";
style = mainStyle;
alwaysvisible = 1;
orientation="horizontal";
//filter = null;
//followscroll = null;
//keepalive = 1;
//overallwidth = null;
//righttoleft = null;
//itemheight=200;
//openonclick = null;
//bgimage="winxp_back.gif";
//position="relative"
//separatorcolor="green";
aI("itemwidth=100;text=What's New;url=http://www.moldex.com/new/whatsnew.htm");
aI("text=Products;showmenu=products;itemwidth=100");
aI("text=Tech Info;showmenu=techinfo;itemwidth=100");
aI("text=Contact Us;showmenu=contactus;itemwidth=100");
aI("text=Support;showmenu=support;itemwidth=100");
aI("text=Company;showmenu=company;itemwidth=100");
}

   with(milonic=new menuname("products")){_c=1
   borderwidth = 1;
   style = mainStyle;
   aI("text=Hearing Protection;showmenu=hearingprotection");
   aI("text=Respiratory Protection;showmenu=respiratoryprotection");
   aI("text=Accessories;url=http://www.moldex.com/new/accessories.htm");
   aI("text=Literature Downloads;url=http://www.moldex.com/new/literaturedownloads.htm");
   aI("text=Request Samples & Literature;url=http://www.moldex.com/new/requestsamples.htm");

   }   
      with(milonic=new menuname("hearingprotection")){_c=1
      borderwidth = 1;
      itemwidth=210;
      alignment="center";
      style = mainStyle;
      margin=3;
      aI("text=Foam Plugs;url=http://www.moldex.com/new/foamplugs.htm");
      aI("text=Reusable Plugs;url=http://www.moldex.com/new/reusableplugs.htm");
      aI("text=Muffs;url=http://www.moldex.com/new/muffs.htm");
      aI("text=Bands;url=http://www.moldex.com/new/bands.htm;");
      }
      
      with(milonic=new menuname("respiratoryprotection")){_c=1
      borderwidth = 1;
      itemwidth=210;
      alignment="center";
      style = mainStyle;
      margin=3;
      aI("text=Disposables;url=http://www.moldex.com/new/disposablerespirators.htm");
      aI("text=8000 Series;url=http://www.moldex.com/new/8000series.htm");
                  }
      
   with(milonic=new menuname("techinfo")){_c=1      
   itemwidth = 220;
   borderwidth = 1;
   style = mainStyle;
   margin=3;
   aI("text=Biohazard Warning;url=http://www.moldex.com/new/pdfs/misc/biohazardwarning.pdf");
   aI("text=Competitive Cross References;url=http://www.moldex.com/new/compcrossreference.htm");
   aI("text=FAQ's;url=http://www.moldex.com/new/faqs.htm");
   aI("text=Fit Testing;url=http://www.moldex.com/new/fittesting.htm;");
   aI("text=Fitting Instructions;url=http://www.moldex.com/new/fittinginstructions.htm;");
   aI("text=Links;url=http://www.moldex.com/new/links.htm;");
   aI("text=MSDS's;url=http://www.moldex.com/new/msds.htm;");
   aI("text=Tech Briefs;url=http://www.moldex.com/new/techbriefs.htm;");
   }

   with(milonic=new menuname("contactus")){_c=1      
   itemwidth = 220;
   borderwidth = 1;
   style = mainStyle;
   margin=3;
   aI("text=Corporate Office;showmenu=corporate");
   aI("text=United States Sales Reps;url=http://www.moldex.com/new/unitedstatessalesreps.htm");
   aI("text=International Sales Reps;url=http://www.moldex.com/new/internationalsalesreps.htm");
   }

   with(milonic=new menuname("corporate")){_c=1
      borderwidth = 1;
      itemwidth=170;
      alignment="center";
      style = mainStyle;
      margin=3;
      aI("text=Accounting;url=http://www.moldex.com/new/corporateoffice/accounting.htm");
      aI("text=Customer Support;url=http://www.moldex.com/new/corporateoffice/customersupport.htm");
      aI("text=Marketing;url=http://www.moldex.com/new/corporateoffice/marketing.htm");
      aI("text=Management Team;url=http://www.moldex.com/new/corporateoffice/managementteam.htm;");
      aI("text=Technical Services;url=http://www.moldex.com/new/corporateoffice/technicalservices.htm;");
      aI("text=Becoming a Distributor;url=http://www.moldex.com/new/corporateoffice/becomingadistributor.htm;");
         }

   with(milonic=new menuname("support")){_c=1
      borderwidth = 1;
      itemwidth=200;
      alignment="center";
      style = mainStyle;
      margin=3;
      aI("text=Training Resources;url=http://www.moldex.com/new/trainingresources.htm");
      aI("text=Chemical Selection Guide;url=http://www.moldex.com/new/chemicalselectionguide.htm");
      aI("text=Distributor Tools;url=http://www.moldex.com/new/distributortools.htm");
   
   }   
   
   with(milonic=new menuname("company")){_c=1
      borderwidth = 1;
      itemwidth=140;
      alignment="center";
      style = mainStyle;
      margin=3;
      aI("text=About Us;url=http://www.moldex.com/new/aboutus.htm");
      aI("text=Limited Warranty;url=http://www.moldex.com/new/limitedwarranty.htm");
      aI("text=Terms & Conditions;url=http://www.moldex.com/new/termsandconditions.htm");
      
      }   
      
   
for(_a=_mnucnt;_a<_m.length;_a++){_drawMenu(_a)}

Also, numerous missing ; throughout.

In your htm file you have <body scroll=auto>. No such animal - just <body>.


Poster: whiskey3
Dated: Thursday August 7 2003 - 4:07:54 BST

Thanks. I just cut and pasted your code and it fixed alot of things. Did it also fix the ";" errors?

I also just uploaded the new navbar to the server and for some reason all my other pages do not display the navbar now?
Click on a link from the navbar to see.

http://ww.moldex.com/new/navbar/menu.htm

Is there a way to fix this? Do I have to re-code a bunch of pages? I don't get what I did? Was it something to do with the old navbar code being different?

How do I also get rid of the drop down arrows? I want the submenus still.
I didn't quite understand the other post on this?

Thanks again alot for the help. :)


Poster: John
Dated: Thursday August 7 2003 - 15:46:37 BST

The menu does not show on other pages because you calls are wrong...

Code: Select all

<SCRIPT language=JavaScript src="navbar/menu_array.js" type=text/javascript></SCRIPT>
<SCRIPT language=JavaScript src="navbar/mmenu.js" type=text/javascript></SCRIPT>

Was it something to do with the old navbar code being different?

Oh, yes. Those files don't exist on your system :!: You forgot to change your library file.

Don't know if I got all the ; or not. Check it.

You still need to remove scroll=auto in your <body>. I have no idea what that is.

The arrows come from the subimage= statement in your mainStyle. Remove it (although I'm not sure why you don't want folks to know there are subs there).


Poster: whiskey3
Dated: Thursday August 7 2003 - 19:42:36 BST

I changed the calls for this page on the server and it's still not working?

http://www.moldex.com/new/8000series.htm

Does this have something to do with the library file?
Where is this and how do I cahnge it to reflect the new navbar?

I just want the arrows NOT on the top navbar....I still want them in the submenus though.

I removed auto scroll.

I fixed all the ";" in the menu.js file.

Thanks a bunch :)


Poster: John
Dated: Thursday August 7 2003 - 19:57:34 BST

whiskey3 wrote:I changed the calls for this page on the server and it's still not working?

Sorry, but the calls are still bad in your code.
whiskey3 wrote:http://www.moldex.com/new/8000series.htm

That is an entirely different URL than you posted in an earlier message.
whiskey3 wrote:Does this have something to do with the library file?

Yep, darn right. May I politely suggest - look at your code before posting your questions. You can see that it's wrong in the source.
whiskey3 wrote:Where is this and how do I cahnge it to reflect the new navbar?

That I can't help you with. You wrote it - where did you store it :?:
whiskey3 wrote:I just want the arrows NOT on the top navbar....I still want them in the submenus though.

Did you try what I suggested?

Suggestion - slow down, look at what you're doing, and take it easy. Work on one page at a time, get that working the way you want, and then move on, instead of jumping around.

I think you can see from the number of posts a few of us have up here we certainly don't mind helping, but we need a little help in return. Sound fair :?: :)


Poster: whiskey3
Dated: Thursday August 7 2003 - 20:22:23 BST

Sorry for the jumping around. I appreciate the help alot.
It just seems like to me that there are alot of differences (of course) between the old version and the new version and I'm just trying to get used to it and it's throwing me.

I'll deal with one thing at a time now.
I'll deal with the calls first.
I have this on the menu.htm page which is here:

http://ww.moldex.com/new/navbar/menu.htm

<SCRIPT language=JavaScript src="milonic_src.js" type=text/javascript></SCRIPT>
<SCRIPT language=JavaScript src="menu.js" type=text/javascript></SCRIPT>

Are those calls right or should they be like the calls you posted.
Those were the old calls, I believe.
When I used those the navbar disappeared.

If the above call is right I assume I have to re-change it on every page?
That's why I gave a link for the other page to show you that I changed the calls there but the navbar still doesn't show up?

http://www.moldex.com/new/8000series.htm

Thanks and I appreciate the help.....will try to take one thing at a time.


Poster: John
Dated: Thursday August 7 2003 - 20:59:12 BST

whiskey3 wrote:Sorry for the jumping around. I appreciate the help alot.

Not a problem. Sorry for 'yelling' at you. It just seemed the jumping around was getting you more confused (not to mention me as well!).
whiskey3 wrote:It just seems like to me that there are alot of differences (of course) between the old version and the new version and I'm just trying to get used to it and it's throwing me.

You are correct. However, all of us who are using v5 went through the same confusion you are now, so don't feel alone. No docs makes things a little tough, but Andy is concentrating on getting the finished product out first, which is as it should be. The docs will be close behind.
whiskey3 wrote:I'll deal with the calls first.
I have this on the menu.htm page which is here:

http://ww.moldex.com/new/navbar/menu.htm

<SCRIPT language=JavaScript src="milonic_src.js" type=text/javascript></SCRIPT>
<SCRIPT language=JavaScript src="menu.js" type=text/javascript></SCRIPT>

Are those calls right or should they be like the calls you posted.

Those are correct. What I posted was what was coming from the other URL you posted, and they are incorrect.
whiskey3 wrote:That's why I gave a link for the other page to show you that I changed the calls there but the navbar still doesn't show up?

Somewhere you have a library file hidden away that is generating the other calls. Note this snip from the bad page...

Code: Select all

<!-- #BeginLibraryItem "/Library/navbar.lbi" -->
<SCRIPT language=JavaScript>
/*
Milonic DHTML Website Navigation Menu
etc.

Actually, there's the location of that library file. In the directory /Library/ you have a file called navbar.lbi. It is set to that whole block of code between <!-- #BeginLibraryItem "/Library/navbar.lbi" --> and <!-- #EndLibraryItem -->. Look at the source for the bad page (you may have to do it in a browser). You'll see those 2 comment lines and the bad calls in between. You need to change the navbar.lbi file to reflect the correct calls (not every page, assuming that library item call is on every page). Then all should be well.


Poster: whiskey3
Dated: Thursday August 7 2003 - 23:28:48 BST

The navbar.lbi file doesn't exist anymore. That was fo an old firworks navbar I made and I guess I forgot to delete the code.
What lines should I delete for this then?

I assume I remove this line:
<!-- #BeginLibraryItem "/Library/navbar.lbi" -->

then this line:

<!-- #EndLibraryItem -->

I think it's thru every page. I'll use find & replace in Dreamweaver to get rid of them all if that's the case.


Poster: John
Dated: Thursday August 7 2003 - 23:43:09 BST

That is the case :D

Don't forget you also have to change the script calls on those pages since that is hard-coded in there as well.


Poster: whiskey3
Dated: Thursday August 7 2003 - 23:52:15 BST

Thanks again :)

I removed the navbar.lbi and changed the script calls but the navbar still isn't showing up on the link page:

http://www.moldex.com/new/8000series.htm

But it shows up on my menu page? (which will be my first page or index.htm page)

http://ww.moldex.com/new/navbar/menu.htm


Poster: Ruth
Dated: Friday August 8 2003 - 2:36:42 BST

I downloaded the page and took the code out of the body and put it in the head above the other js code you have there and the menu shows up. I have no idea why, since I don't really know what the code is doing anyway, but try that, it seems to work.

Ruth


Poster: whiskey3
Dated: Friday August 8 2003 - 2:44:29 BST

Thanks......yaeh it ooks like I'm gonna need to do that on about 100 pages or so..... :(


Poster: Hergio
Dated: Friday August 8 2003 - 4:38:48 BST

The reason its not showing up on the other pages is because the menu script is not located in the directories that those pages reside in. You have the menu.js and milonic_src.js files in the new/navbar/ directory which is where your main page is located. Your 8000series page is not in the navbar directory so it can't access the scripts the way you are writing them in your files. In your script tags, write out the fully qualified name of the script locations so you can just cut & paste the script tags into any page in your site and it will work.

Code: Select all

<SCRIPT language=JavaScript src="http://www.moldex.com/new/navbar/milonic_src.js" type=text/javascript></SCRIPT>
<SCRIPT language=JavaScript src="http://www.moldex.com/new/navbar/menu.js" type=text/javascript></SCRIPT>


Poster: whiskey3
Dated: Friday August 8 2003 - 6:46:41 BST

Thanks....I like the avatar. :)

I thought I was going mad....I understand. Will use Dreamweaver's find & replace and batch it thru the whole site. :)


Poster: whiskey3
Dated: Friday August 8 2003 - 6:53:01 BST

OK I just replaced the correct path in the script and it's still not showing up.

http://www.moldex.com/new/8000series.htm

What up? Is it in the wrong spot for the script?


Poster: Ruth
Dated: Friday August 8 2003 - 8:30:42 BST

Yes, I forgot I put all the files in the same folder to test it. But I also had to have a file called mmenudom.js in the folder, could that have something to do with it? I kind of open the files to see what they say, even if I don't know what most of it means...in the milonic_src.js It says something about The scriptpath variable stores the path to your menu JS files. Andthat - By default, the variable is empty and assumes the current directory. Don't know if that has anything to do with it, but since it's talking about paths it might be something to check?

Hmm, I don't have an avatar, but if I did it would be :?

Ruth :)


Poster: Hergio
Dated: Friday August 8 2003 - 17:11:06 BST

Sorry, I neglected to remember you need to also set your script path too. GO to this post and look at the latest posts...I answered this question once before and it should explain what I meant better.

http://www.milonic.co.uk/menu/forum/viewtopic.php?t=2176
Best of luck.


Poster: Ruth
Dated: Saturday August 9 2003 - 1:24:22 BST

Wolf,
I put a..well your page..up at my site. I set the site to have the same structure as yours. Then I edited the milonic_scr.js file and put in this for the scriptpath

scriptpath="/new/navbar/";

The page works.

LINK REMOVED

I used the same path..except for the domain. That should fix the problem.

Ruth


Poster: whiskey3
Dated: Saturday August 9 2003 - 1:53:01 BST

http://www.moldex.com/new/8000series2.htm

<SCRIPT language=JavaScript src="http:moldex.com/new/navbar/milonic_src.js" type=text/javascript></SCRIPT>
<SCRIPT language=JavaScript src="http:moldex.com/new/navbar/menu.js" type=text/javascript></SCRIPT>

I set the path like you said to the .js files in this script and it still doesn't work?

Any clues please?


Poster: Ruth
Dated: Saturday August 9 2003 - 2:28:17 BST

On the first page which seems to be working now, the code you use as the url is
src="http://www.moldex.com/new/navbar/milonic_src.js"

on the second page which isn't working the code is
http:moldex.com/ etc. there's no // in it, and I'm not sure if it needs www. I have a heck of a time with paths so I generally put the full one in all the time, then I know it's right. So change the code to


[SCRIPT language=JavaScript src="http://www.moldex.com/new/navbar/milonic_src.js" type=text/javascript][/SCRIPT]
[SCRIPT language=JavaScript src="http:moldex.com/new/navbar/menu.js" type=text/javascript][/SCRIPT]

as for the images..the little arrows. you need to check where they are and fix the menu.js file to have the correct pathyou've got two directories for images, one is http://www.moldex.com/new/ and it has arrow.gif and arrowdn.gif The other directory is http://www.moldex.com/new/navbar/images/ and it only has the arrow.gif image, and I can't find out where the arrow_down.gif is at all

right now you have it coded as
topbarimage = "images/arrow_down.gif";
topbarimageloc = "center;middle"
subimage = "images/arrow.gif";

Good Luck....
Ruth


Poster: whiskey3
Dated: Saturday August 9 2003 - 21:21:36 BST

Thanks for catching the mistake.......my error.
Does the script language:

[SCRIPT language=JavaScript src="http://www.moldex.com/new/navbar/milonic_src.js" type=text/javascript][/SCRIPT]
[SCRIPT language=JavaScript src="http://moldex.com/new/navbar/menu.js" type=text/javascript][/SCRIPT]

Go in the head of the html or lower?

For instance the script is in the head of the html code in:

http://www.moldex.com/new/navbar/menu.htm

But not in:

http://www.moldex.com/new/8000series.htm

And they both work?

My arrow button is in my navbar/images folder.
Is there a reason the arrow button is not appearing on the 8000.htm file?
Does it have to be copied in that area like version 3?
Sorry but I'm new to version 5.

I would like to remove the arrow images on the top of the navbar but I still want them to appear in the submenus.
Do you know how to do this?


Poster: Ruth
Dated: Sunday August 10 2003 - 0:53:02 BST

I guess since they both work it doesn't matter if it's in the head or body. I don't really know since I don't know much about code. As to the images, if you check the path you have listed and go to the images folder there is NO arrow.gif in the folder, or arrow_down.gif for that matter.

the path for the page is http://www.moldex.com/new/8000series.htm

then in the menu.js file you have the image path as images/arrow.gif but if you check under

http://www.moldex.com/new/images there is NO arrow.gif file there. It's actually in the new folder where the page is, not the images folder. A suggestion..why not make a folder called navbar with this path http://www.moldex.com/navbar and keep all the menu files and image files for the menu in it? If you decided to have a second differently designed navbar you could make a second folder http://www.moldex.com/navbar1 and keep it's files in it? It seems your paths are really kind of involved and that makes it difficult to remember which path to use for image and such calls.

And I have no idea how 5 works at all, I'm just getting 3 put together and up....I just mess and see if I can figure out about the problems people ask, it helps me learn about the new menu.


As for removing the top bar images, I think it's this line in the .js file
// topbarimage = "images/arrow_down.gif"; So I would assume you take out the path and image name. I don't know if you have to put in say "null" or get rid of everything and leave it blank.

Ruth