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:40
Frame Menu Link and Submenu problem
Poster: coefficient
Dated: Monday February 26 2007 - 20:51:52 GMT
I am having a hard time getting the frame menu to work properly as described in the documentation on the web site.
Quote:
2.b.iii An Item that Opens a Submenu and Links to a New Page. An item that opens a submenu when moused over, or links to a new page when clicked should be coded as follows:
aI("text=itemText;showmenu=submenuName;url=theUrlToOpen.htm;target=contentFrame;onfunction=openSubmenu();offfunction=closeSubmenu();");
where itemText is the text that you want to appear in the menu item, submenuName is the name of the submenu you want to open, theUrlToOpen is the href to the url that you want to open, and contentFrame is the name of the frame where you want the submenu to appear when the item is moused over, or the new page to appear when the item is clicked. The onfunction and offfunction properties must be set exactly as shown in the code above.
aI("text=itemText;showmenu=submenuName;url=theUrlToOpen.htm;target=contentFrame;onfunction=openSubmenu();offfunction=closeSubmenu();");
where itemText is the text that you want to appear in the menu item, submenuName is the name of the submenu you want to open, theUrlToOpen is the href to the url that you want to open, and contentFrame is the name of the frame where you want the submenu to appear when the item is moused over, or the new page to appear when the item is clicked. The onfunction and offfunction properties must be set exactly as shown in the code above.
Problem: The submenu appears in the right frame, but the url for the main menu item does not target to the right frame. the link stays in the current frame of the main menu. It should go to the same frame as the submenu.
here are my frames:
<frameset framespacing="0" border="0" frameborder="0" rows="94,*">
<frame name="header" scrolling="no" noresize target="mainframe"
src="/top.html">
<frame name="mainframe" src="/main.html">
</frameset>
here is the menu code:
_menuCloseDelay=500 // The time delay for menus to remain visible on mouse out
_menuOpenDelay=50 // The time delay before menus open on mouse over
_followSpeed=5 // Follow scrolling speed
_followRate=50 // Follow scrolling Rate
_subOffsetTop=5 // Sub menu top offset
_subOffsetLeft=10 // Sub menu left offset
_scrollAmount=3 // Only needed for Netscape 4.x
_scrollDelay=20 // Only needed for Netcsape 4.x
with(AllImagesStyle=new mm_style()){
bordercolor="";
borderstyle="";
padding=5;
fontstyle="normal";
fontweight="normal";
}
with(menuSub=new mm_style()){
onbgcolor="#8685B6";
oncolor="#ffffff";
offbgcolor="#E7E7EF";
offcolor="#000000";
bordercolor="#B8BAC6";
borderstyle="solid";
borderwidth=1;
separatorcolor="#8685B6";
separatorsize="0";
separatorwidth="0";
padding=4;
fontsize="11px";
fontstyle="normal";
fontfamily="Arial, Helvetica, Verdana";
pagecolor="black";
pagebgcolor="";
headercolor="";
headerbgcolor="";
subimage="/content/art/arrow.gif";
subimagepadding="2";
onborder="0px solid #4F7C1F";
overfilter="Fade(duration=0.2);Alpha(opacity=100);sShadow(color='#626090', Direction=135, Strength=1)";
outfilter="fade(duration=0.3)";
}
with(menuStyle=new mm_style()){
onbgcolor="transparent";
oncolor="#CCCCFF";
offbgcolor="transparent";
offcolor="#ffffff";
bordercolor="";
borderstyle="solid";
borderwidth=0;
separatorcolor="transparent";
separatorsize="0";
separatorwidth="10";
padding=5;
fontsize="12px";
fontstyle="normal";
fontfamily="Arial, Helvetica, Verdana";
pagecolor="";
pagebgcolor="";
headercolor="";
headerbgcolor="";
//subimage="art/arrow.gif";
//subimagepadding="2";
onborder="0px solid #4F7C1F";
overfilter="Fade(duration=0.2);Alpha(opacity=100);sShadow(color='#777777', Direction=135, Strength=5)";
outfilter="fade(duration=0.3)";
}
with(milonic=new menuname("Main Menu")){
style=menuStyle;
top=66;
left=150;
alwaysvisible=1;
orientation="horizontal";
aI("text=Corporate;showmenu=Corporate;url=/corporate.html;target=mainframe;onfunction=openSubmenu();offfunction=closeSubmenu();");
aI("text=Storage;showmenu=Storage;url=/storage.html;target=mainframe;onfunction=openSubmenu();offfunction=closeSubmenu();");
//aI("text=Management Software;target=mainframe;showmenu=Management Software;status=Management Software;onfunction=openSubmenu();offfunction=closeSubmenu();");
//aI("text=Wireless Technology;url=/content/wireless_tech-services.html;showmenu=Wireless Technology;status=Wireless Technology;");
//aI("text=Solutions;url=/content/solutions.html;status=Solutions;onfunction=openSubmenu();offfunction=closeSubmenu();");
//aI("text=Events & News;url=/content/news.html;status=Events & News;target=mainframe;showmenu=Events & News;onfunction=openSubmenu();offfunction=closeSubmenu();");
//aI("text=Search;url=/content/search.html;status=Search;onfunction=openSubmenu();offfunction=closeSubmenu();");
//aI("text=Contact Us;url=/content/contact_us.html;status=Contact Us;target=mainframe");
//aI("text=Home;target=mainframe;url=/content/index.html;status=Back To Home Page;");
}
drawMenus();
here is the javascript code:
<SCRIPT LANGUAGE="JavaScript" SRC="/includes/javascript/milonic_src.js" TYPE="text/javascript"></SCRIPT>
<SCRIPT LANGUAGE="JavaScript">
if(ns4)_d.write("<scr"+"ipt language=JavaScript src=/includes/javascript/mmenuns4.js><\/scr"+"ipt>");
else _d.write("<scr"+"ipt language=JavaScript src=/includes/javascript/mmenudom.js><\/scr"+"ipt>");
</SCRIPT>
<SCRIPT LANGUAGE="JavaScript" TYPE="text/javascript" SRC="/includes/javascript/menu_data_main.js"></SCRIPT>
<SCRIPT LANGUAGE="JavaScript" TYPE="text/javascript" SRC="/includes/javascript/print_code.js"></SCRIPT>
Please advise....
Poster: Ruth
Dated: Tuesday February 27 2007 - 8:57:13 GMT
Hi,
I think we will have to see the pages.
1. You have not listed any call for the submenus, which needs to be on the main.html page.
2. you don't seem to have the call for the mm_navframe.js file which needs to be on the top.html page
Have you set this up using the frames example in the download?
Poster: coefficient
Dated: Wednesday February 28 2007 - 17:43:20 GMT
Please go to http://65.109.165.17 to see the behavior of the links across the top. The submenus work fine. it is the links on the main menu that do not push to the main.html page.
Poster: coefficient
Dated: Wednesday February 28 2007 - 17:47:08 GMT
here is the code of the top.html
Code:
<HEAD>
<meta name="generator" content="ShopSite Pro 8.1.3.1 (data - fedtek_page)">
<TITLE>FedTek: Reliable Network Solutions - # Home Page</TITLE>
<META NAME="keywords" CONTENT="">
<META NAME="description" CONTENT="">
<META NAME="ROBOTS" CONTENT="ALL">
<META CONTENT="no-cache" HTTP-EQUIV="pragma">
<META CONTENT="0" HTTP-EQUIV="expires">
<META CONTENT="Sat, 21 Mar 1998 15:17:34 GMT" HTTP-EQUIV="expires">
<LINK REL="SHORTCUT ICON" HREF="#">
<LINK REL="STYLESHEET" TYPE="text/css" HREF="/styles/main.css">
<DIV STYLE="position:absolute;visibility:hidden"><!-- /*
Milonic DHTML Website Navigation Menu Version 5.0
Written by Andy Woolley - Copyright 2003 (c) Milonic Solutions Limited. All Rights Reserved.
Please visit http://www.milonic.com/ for more information.
*/ --></DIV>
<SCRIPT LANGUAGE="JavaScript" SRC="/includes/javascript/milonic_src.js" TYPE="text/javascript"></SCRIPT>
<script type="text/javascript">
if(ns4)_d.write("<scr"+"ipt type=text/javascript src=/includes/javascript/mmenuns4.js><\/scr"+"ipt>");
else _d.write("<scr"+"ipt type=text/javascript src=/includes/javascript/mmenudom.js><\/scr"+"ipt>");
</script>
<SCRIPT LANGUAGE="JavaScript" TYPE="text/javascript" SRC="/includes/javascript/menu_data_top.js"></SCRIPT>
<script type="text/javascript" src="/includes/javascript/mm_navframe.js"></script>
</HEAD>
<meta name="generator" content="ShopSite Pro 8.1.3.1 (data - fedtek_page)">
<TITLE>FedTek: Reliable Network Solutions - # Home Page</TITLE>
<META NAME="keywords" CONTENT="">
<META NAME="description" CONTENT="">
<META NAME="ROBOTS" CONTENT="ALL">
<META CONTENT="no-cache" HTTP-EQUIV="pragma">
<META CONTENT="0" HTTP-EQUIV="expires">
<META CONTENT="Sat, 21 Mar 1998 15:17:34 GMT" HTTP-EQUIV="expires">
<LINK REL="SHORTCUT ICON" HREF="#">
<LINK REL="STYLESHEET" TYPE="text/css" HREF="/styles/main.css">
<DIV STYLE="position:absolute;visibility:hidden"><!-- /*
Milonic DHTML Website Navigation Menu Version 5.0
Written by Andy Woolley - Copyright 2003 (c) Milonic Solutions Limited. All Rights Reserved.
Please visit http://www.milonic.com/ for more information.
*/ --></DIV>
<SCRIPT LANGUAGE="JavaScript" SRC="/includes/javascript/milonic_src.js" TYPE="text/javascript"></SCRIPT>
<script type="text/javascript">
if(ns4)_d.write("<scr"+"ipt type=text/javascript src=/includes/javascript/mmenuns4.js><\/scr"+"ipt>");
else _d.write("<scr"+"ipt type=text/javascript src=/includes/javascript/mmenudom.js><\/scr"+"ipt>");
</script>
<SCRIPT LANGUAGE="JavaScript" TYPE="text/javascript" SRC="/includes/javascript/menu_data_top.js"></SCRIPT>
<script type="text/javascript" src="/includes/javascript/mm_navframe.js"></script>
</HEAD>
Poster: coefficient
Dated: Wednesday February 28 2007 - 20:50:17 GMT
I went back and edited the sample provided in the download and had the same problem when using external links.
I think I will need to data files to use with my header frame, one for external pages and the other for internal pages. I will write a script to check what is displayed in the main frame to push the right header in the top.html page.