Hello,
As a webdesigner I'm currently working on a new website for the company and a couple of days ago I've implemented a nice looking expandable dhtml-menu based on a Milonic menu-template, which you can view here;
http://www.opinieland.nl/test/nws.html
Since altering, adjusting and implementing the menu was pretty easy I decided to use the same template for another smaller expandable menu for the user to select his country or language, which you can view here:
http://www.opinieland.nl/test/test.htm
Because both of the menu's are using the same javascripts combining the two menu's on a single page causes them to interfere with eachother.
You can see the problem here:
http://www.opinieland.nl/test/ow4.html
Simply changing the names of the javascriptpages (menu_src.js, mmenudom.js and mmenuns4.js) doesn't do the trick.
Since I'm not a scripter I need your support to resolve this problem. I'm anxiously waiting for your comments...
How do I combine two menu's in one page?
Hi Olaf,
You're making it harder than it is. First, don't rename the files. You only need 1 set of milonic_src.js, mmenudom.js and mmenuns4.js. Then you have two separate data files: menu_data.js and flags_data.js. Each of those files will use the same set of base program files. So the coding on the page would be
using your own paths to the files, of course.
Ruth
You're making it harder than it is. First, don't rename the files. You only need 1 set of milonic_src.js, mmenudom.js and mmenuns4.js. Then you have two separate data files: menu_data.js and flags_data.js. Each of those files will use the same set of base program files. So the coding on the page would be
Code: Select all
<BODY bgColor=#eaeaea leftMargin=0 topMargin=0 onload=preloadImages();
marginheight="0" marginwidth="0"> <SCRIPT src="milonic_src.js" type=text/javascript></SCRIPT>
<A class=milonic href="https://milonic.com/"></A>
<SCRIPT type=text/javascript>
if(ns4)_d.write("<scr"+"ipt type=text/javascript src=mmenuns4.js><\/scr"+"ipt>");
else _d.write("<scr"+"ipt type=text/javascript src=mmenudom.js><\/scr"+"ipt>");
</SCRIPT>
<SCRIPT src="menu_data.js" type=text/javascript></SCRIPT>
<SCRIPT src="flags_data.js" type=text/javascript></SCRIPT>
using your own paths to the files, of course.
Ruth
Hi Olaf,
Ruth's suggestion works very well, especially if you want to have the additional menu only one some pages, but not on others. I will suggest another approach you might consider.
If you plan to have both main menus on every page, then you could just define both menus in the same menu_data.js file (along with all of their styles and submenus). You can have as many "main" menus in the file as you want. The features that distinguish a main menu from a submenu are: (1) a main menu has alwaysvisible=1 and (2) a main menu is usually positioned independently on the page, rather than taking its position from that of another menu. All you have to do is make sure that the two menus have two different names. Like so:
Cheers,
Kevin
Ruth's suggestion works very well, especially if you want to have the additional menu only one some pages, but not on others. I will suggest another approach you might consider.
If you plan to have both main menus on every page, then you could just define both menus in the same menu_data.js file (along with all of their styles and submenus). You can have as many "main" menus in the file as you want. The features that distinguish a main menu from a submenu are: (1) a main menu has alwaysvisible=1 and (2) a main menu is usually positioned independently on the page, rather than taking its position from that of another menu. All you have to do is make sure that the two menus have two different names. Like so:
Code: Select all
with(milonic=new menuname("MainMenu1")){
alwaysvisible=1;
left=10;
top=10;
...
}
with(milonic=new menuname("MainMenu2")){
alwaysvisible=1;
left=10;
top=200;
...
}
Kevin
Ruth and Kevin, thanks a lot for the feedback! I didn't expect it to be this simple.
I combined both menu's in one javascript-file and even added another one for the business-button.
Here's the final result;
http://www.opinieland.nl/test/ow4.html
I combined both menu's in one javascript-file and even added another one for the business-button.
Here's the final result;
http://www.opinieland.nl/test/ow4.html