Help Check Menu Please...

Having problems with DHTML Menu? There is usually somebody here who knows the answer.
User avatar
whiskey3
Super Advanced
Super Advanced
Posts: 79
Joined: Fri Jul 18, 2003 8:47 pm

Help Check Menu Please...

Post by whiskey3 »

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?
Wolf
User avatar
Hergio
Milonic God
Milonic God
Posts: 1123
Joined: Wed Jun 12, 2002 7:46 pm
Location: Rochester, NY

Post by Hergio »

(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.
Dave Hergert
Software Engineer
"Helping to make the menu better, one :?: at a time."
User avatar
John
 Team
 Team
Posts: 5967
Joined: Sun May 19, 2002 8:23 pm
Location: Phoenix, AZ
Contact:

Post by John »

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>.
John
User avatar
whiskey3
Super Advanced
Super Advanced
Posts: 79
Joined: Fri Jul 18, 2003 8:47 pm

Post by whiskey3 »

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. :)
Wolf
User avatar
John
 Team
 Team
Posts: 5967
Joined: Sun May 19, 2002 8:23 pm
Location: Phoenix, AZ
Contact:

Post by John »

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).
John
User avatar
whiskey3
Super Advanced
Super Advanced
Posts: 79
Joined: Fri Jul 18, 2003 8:47 pm

Post by whiskey3 »

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 :)
Wolf
User avatar
John
 Team
 Team
Posts: 5967
Joined: Sun May 19, 2002 8:23 pm
Location: Phoenix, AZ
Contact:

Post by John »

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.
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 :?: :)
John
User avatar
whiskey3
Super Advanced
Super Advanced
Posts: 79
Joined: Fri Jul 18, 2003 8:47 pm

Post by whiskey3 »

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.
Wolf
User avatar
John
 Team
 Team
Posts: 5967
Joined: Sun May 19, 2002 8:23 pm
Location: Phoenix, AZ
Contact:

Post by John »

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.
John
User avatar
whiskey3
Super Advanced
Super Advanced
Posts: 79
Joined: Fri Jul 18, 2003 8:47 pm

Post by whiskey3 »

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.
Wolf
User avatar
John
 Team
 Team
Posts: 5967
Joined: Sun May 19, 2002 8:23 pm
Location: Phoenix, AZ
Contact:

Post by John »

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.
John
User avatar
whiskey3
Super Advanced
Super Advanced
Posts: 79
Joined: Fri Jul 18, 2003 8:47 pm

Post by whiskey3 »

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
Wolf
User avatar
Ruth
 Team
 Team
Posts: 8763
Joined: Thu May 15, 2003 5:02 am
Location: Yucaipa, CA
Contact:

Post by Ruth »

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
User avatar
whiskey3
Super Advanced
Super Advanced
Posts: 79
Joined: Fri Jul 18, 2003 8:47 pm

Post by whiskey3 »

Thanks......yaeh it ooks like I'm gonna need to do that on about 100 pages or so..... :(
Wolf
User avatar
Hergio
Milonic God
Milonic God
Posts: 1123
Joined: Wed Jun 12, 2002 7:46 pm
Location: Rochester, NY

Post by Hergio »

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>
Dave Hergert
Software Engineer
"Helping to make the menu better, one :?: at a time."
User avatar
whiskey3
Super Advanced
Super Advanced
Posts: 79
Joined: Fri Jul 18, 2003 8:47 pm

Post by whiskey3 »

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. :)
Wolf
User avatar
whiskey3
Super Advanced
Super Advanced
Posts: 79
Joined: Fri Jul 18, 2003 8:47 pm

Post by whiskey3 »

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?
Wolf
User avatar
Ruth
 Team
 Team
Posts: 8763
Joined: Thu May 15, 2003 5:02 am
Location: Yucaipa, CA
Contact:

Post by Ruth »

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 :)
User avatar
Hergio
Milonic God
Milonic God
Posts: 1123
Joined: Wed Jun 12, 2002 7:46 pm
Location: Rochester, NY

Post by Hergio »

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/vie ... php?t=2176
Best of luck.
Dave Hergert
Software Engineer
"Helping to make the menu better, one :?: at a time."
User avatar
Ruth
 Team
 Team
Posts: 8763
Joined: Thu May 15, 2003 5:02 am
Location: Yucaipa, CA
Contact:

Post by Ruth »

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
Post Reply