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:50
Tricky Menu Request - kinda like the Amazon Style Tab Menu
Poster: UEBen
Dated: Tuesday March 15 2005 - 14:48:40 GMT
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:
http://www.milonic.com/forum/viewtopic.php?t=5447
http://www.milonic.com/forum/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://www.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
Poster: Ruth
Dated: Tuesday March 15 2005 - 18:45:45 GMT
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://www.milonic.com/openmenusbyurl.js
Ruth
Poster: UEBen
Dated: Wednesday March 16 2005 - 22:20:37 GMT
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://www.milonic.com/openmenusbyurl.js
Ruth
I finally got it to work!
Thank you Ruth!
All you Milonic personnel rock! Andy should give you all a raise...
Much love,
Ben
Poster: kevin3442
Dated: Wednesday March 16 2005 - 22:29:39 GMT
UEBen wrote:
...Andy should give you all a raise...
Agreed! He should pay us at least double what we get now!
Poster: UEBen
Dated: Wednesday March 16 2005 - 22:47:10 GMT
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
Poster: kevin3442
Dated: Wednesday March 16 2005 - 23:09:27 GMT
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
Poster: Andy
Dated: Wednesday March 16 2005 - 23:21:38 GMT
Hmmm, Spooky - 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.
Poster: Andy
Dated: Thursday March 17 2005 - 0:05:07 GMT
Quote:
Agreed! He should pay us at least double what we get now!
Ooerrr.... - Could we have a mutiny on our hands by any chance
-- Andy
Poster: Ruth
Dated: Thursday March 17 2005 - 2:56:50 GMT
Andy wrote:
Ooerrr.... Could we have a mutiny on our hands by any chance
Would that be Mutiny for the Bounty?
Ruth
Poster: UEBen
Dated: Thursday March 17 2005 - 13:07:39 GMT
I prefer the Booty. Aarrrr!
PS. It works perfectly now with the current version.
Thanks again.
Ben
Poster: kevin3442
Dated: Thursday March 17 2005 - 16:55:56 GMT
Ruth wrote:
Would that be Mutiny for the Bounty?
UBen wrote:
I prefer the Booty. Aarrrr!
How 'bout a compromise... Bountiful Booty?
Kevin
Poster: UEBen
Dated: Thursday March 17 2005 - 18:01:31 GMT
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
Poster: kevin3442
Dated: Friday March 18 2005 - 2:59:21 GMT
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
openmenusbyurl.js -- same issue?
Poster: kevincal
Dated: Monday June 20 2005 - 16:10:34 BST
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:
<!-- 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://www.milonic.com/ for more information.
See http://www.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= Home ;url=/menu_preview.php;pagematch=menu_preview.php;keepalive=1;');
aI('text= About Us ;showmenu=first_11;url=;pagematch=;keepalive=1;');
aI('text= Services ;url=/services.html;pagematch=services.html;keepalive=1;');
aI('text= Our Guarantee ;url=/guarantee.html;pagematch=guarantee.html;keepalive=1;');
aI('text= Resources ;url=/newsletter.html;pagematch=newsletter.html;keepalive=1;');
aI('text= Rate Schedule ;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 -->
<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://www.milonic.com/ for more information.
See http://www.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= Home ;url=/menu_preview.php;pagematch=menu_preview.php;keepalive=1;');
aI('text= About Us ;showmenu=first_11;url=;pagematch=;keepalive=1;');
aI('text= Services ;url=/services.html;pagematch=services.html;keepalive=1;');
aI('text= Our Guarantee ;url=/guarantee.html;pagematch=guarantee.html;keepalive=1;');
aI('text= Resources ;url=/newsletter.html;pagematch=newsletter.html;keepalive=1;');
aI('text= Rate Schedule ;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.