Tricky Menu Request - kinda like the Amazon Style Tab Menu

Having problems with DHTML Menu? There is usually somebody here who knows the answer.
Post Reply
UEBen
Super Advanced
Super Advanced
Posts: 34
Joined: Thu Mar 27, 2003 8:26 pm
Location: Evansville, IN
Contact:

Tricky Menu Request - kinda like the Amazon Style Tab Menu

Post by UEBen »

I have a tricky menu request that I need some assistance with. I was asked if this could be done. I said it could, however now I'm not sure how to do it and may have bitten of more than I can chew (so to speak). Any assistance or advice you could give me would be much appreciated.

Take a look the dev site I'm working on: http://192.195.225.90/prospects/

Here is what I've been asked to do: For each of the six main menus at the top I need the immediate first-level sub-menu for each one to be visible automatically when the page loads for that menu item (directory). Subsequently, when you mouse over any of the other main menus, the first-level sub-menu for that menu becomes visible - then on mouse out, the default state for main menu (directory you are in -with its first-level sub-menu) becomes visible again.

So, for example, the menu for "Prospects" should be displayed automatically when you are on any page under the "/prospects/" directory (without having to mouseOver it). Then when you mouse over another main menu item, for example "About UE", the sub-menu items for "About UE" are displayed. Then when you mouse out (or mouse over "Prospects", whichever), the default sub-menu items for "Prospects" should be displayed again. This would go for any of the other five main menu items as well.

I hope I'm being clear. I've looked into several other posts that touch on this theme or have relate information:

viewtopic.php?t=5447
viewtopic.php?t=5492

However, I'm getting confused by all the different methods and functions that is needed to manipulate the menu and I don't really know where to start to implement this feature.

aaronz has pretty close example of what I need: http://www.input.com/_milonic/

...which is similar to the Amazon tab menu: http://milonic.com/menusample74.php

...the only difference is that I need the menu to work on mouseOver not onClick and also display the first level sub-menu for each major menu item when you are on a page in the directory for the particular main menu item - instead of being blank.

I love the Milonic menu and I've been able to tweak it in the past to meet my needs, however I'm a bit over my head on this one and would really appreciate the help.

Thanks.

Ben
User avatar
Ruth
 Team
 Team
Posts: 8763
Joined: Thu May 15, 2003 5:02 am
Location: Yucaipa, CA
Contact:

Post by Ruth »

There is a module that you might be able to use. I've not played with it so can't give you any more information on it. It is supposed to open the submenus based on the url as you can see by the name :)

http://milonic.com/openmenusbyurl.js

Ruth
UEBen
Super Advanced
Super Advanced
Posts: 34
Joined: Thu Mar 27, 2003 8:26 pm
Location: Evansville, IN
Contact:

Post by UEBen »

Ruth wrote:
There is a module that you might be able to use. I've not played with it so can't give you any more information on it. It is supposed to open the submenus based on the url as you can see by the name :)

http://milonic.com/openmenusbyurl.js

Ruth
I finally got it to work! :D

Thank you Ruth!

All you Milonic personnel rock! Andy should give you all a raise... ;)

Much love,
Ben
User avatar
kevin3442
Milonic God
Milonic God
Posts: 2460
Joined: Sat Sep 07, 2002 12:09 am
Location: Lincoln, NE
Contact:

Post by kevin3442 »

UEBen wrote:...Andy should give you all a raise... ;)
Agreed! He should pay us at least double what we get now! ;)
UEBen
Super Advanced
Super Advanced
Posts: 34
Joined: Thu Mar 27, 2003 8:26 pm
Location: Evansville, IN
Contact:

Post by UEBen »

PS:

There is a bug with it in FireFox, however. It works great in IE but in FireFox the sub menu follows you down the screen if there is room to scroll. Any ideas on how to get the menu to stay put like it does in IE?

Thanks again,

Ben
User avatar
kevin3442
Milonic God
Milonic God
Posts: 2460
Joined: Sat Sep 07, 2002 12:09 am
Location: Lincoln, NE
Contact:

Post by kevin3442 »

Hi Ben,

Hmmm... funny you should ask. I think the same thing is affecting the menu in this thread. Have a look there at the suggestion I posted.

Cheers,

Kevin
User avatar
Andy
Milonic
Milonic
Posts: 3308
Joined: Sun May 19, 2002 8:23 pm
Location: Menu Developer
Contact:

Post by Andy »

Hmmm, Spooky :D - I've just released an emergency fix for a completely unrelated issue that should help fix this problem.

Version is 5.718a is is now current.

Cheers
Andy.
User avatar
Andy
Milonic
Milonic
Posts: 3308
Joined: Sun May 19, 2002 8:23 pm
Location: Menu Developer
Contact:

Post by Andy »

Agreed! He should pay us at least double what we get now!
Ooerrr.... :oops: - Could we have a mutiny on our hands by any chance :P

-- Andy
User avatar
Ruth
 Team
 Team
Posts: 8763
Joined: Thu May 15, 2003 5:02 am
Location: Yucaipa, CA
Contact:

Post by Ruth »

Andy wrote:Ooerrr.... :oops: Could we have a mutiny on our hands by any chance
Would that be Mutiny for the Bounty? :P

Ruth
User avatar
kevin3442
Milonic God
Milonic God
Posts: 2460
Joined: Sat Sep 07, 2002 12:09 am
Location: Lincoln, NE
Contact:

Post by kevin3442 »

Very punny Ruth! :lol:

Kevin
UEBen
Super Advanced
Super Advanced
Posts: 34
Joined: Thu Mar 27, 2003 8:26 pm
Location: Evansville, IN
Contact:

Post by UEBen »

I prefer the Booty. Aarrrr!

PS. It works perfectly now with the current version.

Thanks again.

Ben
User avatar
kevin3442
Milonic God
Milonic God
Posts: 2460
Joined: Sat Sep 07, 2002 12:09 am
Location: Lincoln, NE
Contact:

Post by kevin3442 »

Ruth wrote:Would that be Mutiny for the Bounty?
UBen wrote:I prefer the Booty. Aarrrr!
How 'bout a compromise... Bountiful Booty?

;)

Kevin
UEBen
Super Advanced
Super Advanced
Posts: 34
Joined: Thu Mar 27, 2003 8:26 pm
Location: Evansville, IN
Contact:

Post by UEBen »

Hey Kevin,

The openmenusbyurl.js is still somewhat buggy, could you help me tweak it some?

If not, no sweat - don't worry about it. I'll eventually figure it out...

You see, it doesn't work work if you navigate deeper then the first sub-menu of the menu. In other words, if I visit a page two directories down or deep, the openmenusbyurl.js doesn't work. Would you know what to modify or change in order to get it work?

Take a look: http://192.195.225.90/prospects/

Hover over "Admission" and then click on any of the links under the "Accepted Student Information" menu item, for example, you'll see what I mean.

Note: I only want the first level of the sub-menu to be displayed - not the whole menu path.

Thanks,
Ben
User avatar
kevin3442
Milonic God
Milonic God
Posts: 2460
Joined: Sat Sep 07, 2002 12:09 am
Location: Lincoln, NE
Contact:

Post by kevin3442 »

Hi Ben,

I haven't really used that module much, so I'd have to play around with it a little before I could try to help. I'll try to find time to do that tomorrow. Never fear... one way or another, we can get you where you want to go.

Kevin
kevincal
Beginner
Beginner
Posts: 2
Joined: Mon Jun 20, 2005 3:35 pm

openmenusbyurl.js -- same issue?

Post by kevincal »

hello,

i've been reading the postings and am experiencing a very similar issue and cannot get it to work. I have even included the file openmenusbyurl.js with the forceChildSubOpen=true option set. Still no luck...

any ideas?

Code: Select all

	<!-- START MENU -->
	<script type="text/javascript" src="/menu/milonic_src.js"></script>
	<script	type="text/javascript">
	if(ns4)_d.write("<scr"+"ipt type=text/javascript src='/menu/mmenuns4.js'><\/scr"+"ipt>");
	  else _d.write("<scr"+"ipt type=text/javascript src='/menu/mmenudom.js'><\/scr"+"ipt>");
	</script>
	<script type="text/javascript">
	/*
	Milonic DHTML Menu - JavaScript Website Navigation System.
	Copyright 2004 (c) Milonic Solutions Limited. All Rights Reserved.
	Version 5+ Data File structure is the property of Milonic Solutions Ltd and must only be used in Milonic DHTML Products
	This is a commercial software product, please visit http://milonic.com/ for more information.
	See http://milonic.com/license.php for Commercial License Agreement
	All Copyright statements must always remain in place in all files at all times
	*******  PLEASE NOTE: THIS IS NOT FREE SOFTWARE, IT MUST BE LICENSED FOR ALL USE  *******
	*/

	_menuCloseDelay=500;
	_menuOpenDelay=150;
	_subOffsetTop=2;
	_subOffsetLeft=-2;

	forgetClickValue="false";

	with(menuStyle=new mm_style()){
	bgimage="/images/tab_off.gif";
	onbgimage="/images/tab_on.gif";
	overbgimage="/images/tab_on.gif";
	clickbgimage="/images/tab_on.gif";
	pagebgimage="/images/tab_on.gif";
	align="center";
	fontfamily="Verdana, Tahoma, Arial";
	fontsize="12px";
	fontstyle="normal";
	fontweight="bold";
	itemheight=26;
	itemwidth=122;
	padding=0;
	offcolor="#FFFFFF";
	oncolor="#FFFFFF";
	openonclick=1;
	}

	with(SubMenuStyle=new mm_style()){
	styleid=1;
	align="center";
	separatorimage="/images/tab_subback_sep.gif";
	bgimage="/images/tab_subback.gif";
	pagebgimage="/images/tab_subback.gif";
	fontfamily="Verdana, Tahoma, Arial";
	fontsize="11px";
	fontstyle="normal";
	fontweight="bold";
	itemheight=29;
	itemwidth=126;
	offcolor="#000000";
	oncolor="#000000";
	ondecoration="underline";
	openonclick=1;
	padding=6;
	separatorsize=3;
	}
	</script>

	<script type="text/javascript" src="/menu/openmenubyurl.js"></script>

	<SCRIPT type="text/javascript">
	with(milonic=new menuname("Main Menu")){
		alwaysvisible=1;
		openstyle="tab";
		orientation="horizontal";
		screenposition="center";
		style=menuStyle;
		top=128;
		menuwidth="100%";
		aI('text=&nbsp;&nbsp;&nbsp;Home&nbsp;&nbsp;&nbsp;;url=/menu_preview.php;pagematch=menu_preview.php;keepalive=1;');
		aI('text=&nbsp;&nbsp;&nbsp;About Us&nbsp;&nbsp;&nbsp;;showmenu=first_11;url=;pagematch=;keepalive=1;');
		aI('text=&nbsp;&nbsp;&nbsp;Services&nbsp;&nbsp;&nbsp;;url=/services.html;pagematch=services.html;keepalive=1;');
		aI('text=&nbsp;&nbsp;&nbsp;Our Guarantee&nbsp;&nbsp;&nbsp;;url=/guarantee.html;pagematch=guarantee.html;keepalive=1;');
		aI('text=&nbsp;&nbsp;&nbsp;Resources&nbsp;&nbsp;&nbsp;;url=/newsletter.html;pagematch=newsletter.html;keepalive=1;');
		aI('text=&nbsp;&nbsp;&nbsp;Rate Schedule&nbsp;&nbsp;&nbsp;;url=/rateschedule.html;pagematch=rateschedule.html;keepalive=1;');
	}

	with(milonic=new menuname('first_11')){ 
		style=SubMenuStyle; 
		openstyle='tab'; 
		orientation='horizontal'; 
		aI('text=About CA$SH In;url=/about.php;pagematch=about.php;');
		aI('text=Why Ca$h In;url=/whycashin.html;pagematch=whycashin.html;');
		aI('text=FAQs;url=/faq.html;pagematch=faq.html;');
		aI('text=Our Customers;url=/testimonials.html;pagematch=testimonials.html;');
	} 


	drawMenus();
	</SCRIPT>
	<!-- END MENU -->

As you can see by viewing the source, I have included the openmenubyurl.js however the about.php does not auto-load the sub menu. Is there something I’m missing?

Also, how do I minimize the ‘flashing’ of the images on tab overs? On my system there is a brief flash when the image rotates. Is this a time setting somewhere?

Thank you very much.
User avatar
John
 Team
 Team
Posts: 5967
Joined: Sun May 19, 2002 8:23 pm
Location: Phoenix, AZ
Contact:

Post by John »

Got a URL? I have a feeling you're down-level in your code.
John
Post Reply