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:07
Issue with Multi menus
Poster: Vschultz
Dated: Wednesday April 26 2006 - 16:43:19 BST
I’m having an issue with trying to set up two menus… one that is horizontal and now a new one that will be displayed vertically, but only for specific pages on the site. I did a search and tried to weed out what I’m doing wrong but none of them seemed to answer my issue.
Quote:
Header (include file)
<SCRIPT type="text/javascript" src="/Script/milonic_src.js"></SCRIPT>
<SCRIPT type="text/javascript">
<internal function code>
if(ns4)_d.write("<scr"+"ipt language=JavaScript src=/Script/mmenuns4.js><\/scr"+"ipt>");
else _d.write("<scr"+"ipt language=JavaScript src=/Script/mmenudom.js><\/scr"+"ipt>");
//-->
</SCRIPT>
<!--#include Virtual="/website/script/menu_data.js"-->
<SCRIPT type="text/javascript" src="/Script/milonic_src.js"></SCRIPT>
<SCRIPT type="text/javascript">
<internal function code>
if(ns4)_d.write("<scr"+"ipt language=JavaScript src=/Script/mmenuns4.js><\/scr"+"ipt>");
else _d.write("<scr"+"ipt language=JavaScript src=/Script/mmenudom.js><\/scr"+"ipt>");
//-->
</SCRIPT>
<!--#include Virtual="/website/script/menu_data.js"-->
Quote:
Horizontal Call
<SCRIPT>with(milonic=new menuname("Main Menu")){style=menuStyle;top=155;left=200;alwaysvisible=1;orientation="horizontal";overfilter="";position="relative";
aI("showmenu=About;image=/Elements/Menu/Menu_01.jpg");
}
drawMenus();</SCRIPT>
<SCRIPT>with(milonic=new menuname("Main Menu")){style=menuStyle;top=155;left=200;alwaysvisible=1;orientation="horizontal";overfilter="";position="relative";
aI("showmenu=About;image=/Elements/Menu/Menu_01.jpg");
}
drawMenus();</SCRIPT>
Quote:
Horizontal menu_data.js
with(menuStyle=new mm_style()){
onbgcolor="#ffffff";
oncolor="#002D82";
.
.
with(milonic=new menuname("About")){
style=menuStyle;
aI("text=Title;url=Link.asp;");
with(menuStyle=new mm_style()){
onbgcolor="#ffffff";
oncolor="#002D82";
.
.
with(milonic=new menuname("About")){
style=menuStyle;
aI("text=Title;url=Link.asp;");
----------------------------------------------------------------------------------
----------------------------------------------------------------------------------
----------------------------------------------------------------------------------
Now, to add a left vertical menu to about a dozen pages I did the following:
Quote:
Same include Header as above
<SCRIPT type="text/javascript" src="/Script/milonic_src.js"></SCRIPT>
<SCRIPT type="text/javascript">
<internal function code>
if(ns4)_d.write("<scr"+"ipt language=JavaScript src=/Script/mmenuns4.js><\/scr"+"ipt>");
else _d.write("<scr"+"ipt language=JavaScript src=/Script/mmenudom.js><\/scr"+"ipt>");
//-->
</SCRIPT>
<!--#include Virtual="/website/script/menu_data.js"-->
<!--#include Virtual="/website/China06/script/menu_data.js"--> <----- This is new
<SCRIPT type="text/javascript" src="/Script/milonic_src.js"></SCRIPT>
<SCRIPT type="text/javascript">
<internal function code>
if(ns4)_d.write("<scr"+"ipt language=JavaScript src=/Script/mmenuns4.js><\/scr"+"ipt>");
else _d.write("<scr"+"ipt language=JavaScript src=/Script/mmenudom.js><\/scr"+"ipt>");
//-->
</SCRIPT>
<!--#include Virtual="/website/script/menu_data.js"-->
<!--#include Virtual="/website/China06/script/menu_data.js"--> <----- This is new
Quote:
Vertical menu_data.js located in /China06/Script/menu_data.js
with(menuStyle2=new mm_style()){
onbgcolor="#ffffff";
.
.
with(milonic=new menuname("A")){
style=menuStyle2;
aI("text=title;url=Link.asp;");
with(menuStyle2=new mm_style()){
onbgcolor="#ffffff";
.
.
with(milonic=new menuname("A")){
style=menuStyle2;
aI("text=title;url=Link.asp;");
Quote:
Call on for the new menu
<script>
with(milonic=new menuname("Sem Menu")){
style=menuStyle2;
top=155;
left=200;
alwaysvisible=1;
orientation="vertical";
overfilter="";
position="relative";
aI("text=A Menu Samples;showmenu=A;");
}
drawMenus();
</script>
<script>
with(milonic=new menuname("Sem Menu")){
style=menuStyle2;
top=155;
left=200;
alwaysvisible=1;
orientation="vertical";
overfilter="";
position="relative";
aI("text=A Menu Samples;showmenu=A;");
}
drawMenus();
</script>
Thanks in advance!!
Poster: John
Dated: Thursday April 27 2006 - 14:56:05 BST
So what is it that's going wrong? A URL, as requested, is much preferred.
Poster: Vschultz
Dated: Tuesday May 2 2006 - 13:41:54 BST
Sorry it has taken me so long to follow-up on the link request.
http://www.cscmp.org/China06/index.asp
Thanks in advance
Poster: Migru
Dated: Tuesday May 2 2006 - 14:42:56 BST
Hi
the horizontal menu refers to its menuStyle by style=menuStyle;
the vertical menu refers to its menuStyle by style=menuStyle2;
BUT THERE IS NO menuStyle2 definition !!
So modify the name "menuStyle2" (vertical menu) into "menuStyle" or make a copy of the menuStyle dfinition in the script above and
copy it below it, and then modifying the copy into
with(menuStyle2=new mm_style()){
etc.... in order to have different styles setting, colors etc.
Something else: Both main menus are "relative"; positioned. This means, there is no need to specify top and left, as these positions are fixed by the table.
Michael