Back To Start Of Archive
Taken From The Forum: Archived Topics for the old Version 3.0 JavaScript Menu
Forum Topic: Click to view post
Last Updated: Saturday July 14 2012 - 06:07:56
problem with frames in frontpage
Poster: bridge
Dated: Wednesday January 26 2005 - 1:23:09 GMT
Hi
I'm trying to use three frames. The menu is in the top frame and stays allways the same. On click the pages in the left and main frame should change. This works fine as long as all the files are in the same folder. But it goes wrong if i manage pages in different folders. The left frame will still change to the right page, but the page in the main frame changes into a blank page. I think it is because it keeps directing to the original folder. However, changing links in x/x/ or ../x don't help.
Does anybody know how to solve this problem?
Poster: Ruth
Dated: Wednesday January 26 2005 - 1:31:59 GMT
Hi,
We need to see the page to test what's happening, can you post a url?
Ruth
url
Poster: bridge
Dated: Wednesday January 26 2005 - 2:58:30 GMT
url= http://www.hetsignaal.com/future2005
use the links signalement-nr8 & agenda-2005
In the script the menu refers to a page called 'leftuitslag.htm'. There is no script on that page.
leftuitslag appears correctly and will change back and forward without a problem
signalement - nr8 refers to the page 'testpage2.htm' I put that page in a different folder. testpage2 should appear in the mainframe.
agenda 2005 refers to the page 'agenda.htm' This file is in the original folder, the one i made first. If i move the file to another folder the same thing as with testpage will happen.
agenda.htm will keep on working no matter how many times you click it, but using the backbutton the page in the leftframe will change back, the page in the main frame won't
It is obviously a context problem, but i don't know how to solve this.
Poster: bridge
Dated: Wednesday January 26 2005 - 3:05:25 GMT
with the last changes i made the backbutton problem seems to be solved, but the other problems still exist
Poster: Ruth
Dated: Wednesday January 26 2005 - 7:49:46 GMT
I'm a bit confused, because you have codes for both Version 3 and Version 5 of the menu. I've moved the topic to version 3 because that seems to be the one you have functioning. That version is no longer supported. It is too out of date and most of us don't know the ins and outs of that program.
In this instance the problem seems to be the call for the page. I see you have a function and it is working since clicks on n7 will load two different pages as called agenda.htm\",\"leftuitslag.htm. I would think that the reason the testpage2.htm won't load is because according to the link it should be in that folder but it's not, you've moved it. You will have to change the link to reflect where it is now.
If you can do it, I would suggest you switch to version 5. There is also a function available that will allow you to load multiple pages into multiple iframes. The advantage is that you will have only one page, as you do now, and in version 5 you only need the code on that main page, since the menu is designed to drop over the iframe instead of having to be coded on every page you put in that main body section. To give you a start so you can test it I've made up a test page. Rather than put it up, since I don't have your layout, I'll put the code for the page and the menu_data.js file here.
PAGE CODE: I didn't get fancy with css for the table sizes, borders etc. That's something you'd have to set up yourself.
Code:
<HTML>
<HEAD>
<TITLE>Table-iframe from frames layout</TITLE>
<script>
function openIFrame(iFrameId,winURL)
{
ifId=gmobj(iFrameId)
ifId.src=winURL
}
</script>
</HEAD>
<BODY bgColor=#062f0c leftMargin="0" topMargin="0" VSPACE="0" HSPACE="0" MARGINWIDTH="0" MARGINHEIGHT="0">
<SCRIPT src="milonic_src.js" type=text/javascript></SCRIPT>
<SCRIPT type=text/javascript>
<!--
if(ns4)_d.write("<scr"+"ipt language=JavaScript src=mmenuns4.js><\/scr"+"ipt>");
else _d.write("<scr"+"ipt language=JavaScript src=mmenudom.js><\/scr"+"ipt>");
-->
</SCRIPT>
<SCRIPT src="iframes_data.js" type=text/javascript></SCRIPT>
<TABLE BORDER="1" CELLPADDING="2" CELLSPACING="0" WIDTH="100%" HEIGHT="189px" bordercolor="#FFFF00">
<TR>
<TD height="166px"><IMG WIDTH="945" HEIGHT="156" BORDER="0" ALIGN="Top" SRC="WEBLOGOSIGNAAL2.jpg"></TD>
</TR>
<TR>
<TD><CENTER>
<TABLE BORDER="1" bordercolor="#CC99FF" CELLPADDING="2" CELLSPACING="0" Width="65%" height="25px">
<TR>
<TD valign="bottom"><script type="text/javascript">
with(milonic=new menuname("Main Menu")){
style=menuStyle;
top="offset=5";
position="relative";
alwaysvisible=1;
orientation="horizontal";
aI("text=Home;url=http://www.milonic.com/;status=Back To Home Page;");
aI("text=Signalement;showmenu=signalement;");
aI("text=Uitslagen;showmenu=uitslagen;");
aI("text=Agenda;showmenu=agenda;");
aI("text=CHAMP;showmenu=champ;");
aI("text=Het Signaal;showmenu=het_signaal;");
aI("text=BBNA;showmenu=bbna;");
aI("text=NBB;showmenu=nbb;");
aI("text=Sitemap;showmenu=sitemap;");
}
drawMenus();
</script>
</TD>
</TR>
</TABLE>
</CENTER>
</TD>
</TR>
</TABLE>
<p>
<TABLE BORDER="1" bordercolor="#99FFFF" CELLPADDING="0" CELLSPACING="0" WIDTH="100%">
<TR>
<TD width="116px"><iframe frameborder="1" width="116" height="90%" src="pageleft.htm" scrolling="no" name="frame1"> </iframe></TD>
<TD><iframe frameborder="1" width="100%" height="90%" marginwidth="20" marginheight="10" src="start_body.htm" scrolling="auto" name="frame2"> </iframe></TD>
</TR>
</TABLE>
<p>
<TABLE id=AutoNumber1 style="BORDER-COLLAPSE: collapse" cellSpacing=0
cellPadding=0 width="100%" border=1 bordercolor="#ffffff">
<TBODY>
<TR>
<TD width="20%">
<P align=center><IMG height=30
src="pagedown_files/miloniclogo_tran_80x30.gif" width=80 border=0
href="http://www.milonic.com/" <a></P></TD>
<TD width="20%"> </TD>
<TD width="20%"> </TD>
<TD width="20%"> </TD>
<TD width="20%"> </TD></TR></TBODY></TABLE>
</BODY></HTML>
<HEAD>
<TITLE>Table-iframe from frames layout</TITLE>
<script>
function openIFrame(iFrameId,winURL)
{
ifId=gmobj(iFrameId)
ifId.src=winURL
}
</script>
</HEAD>
<BODY bgColor=#062f0c leftMargin="0" topMargin="0" VSPACE="0" HSPACE="0" MARGINWIDTH="0" MARGINHEIGHT="0">
<SCRIPT src="milonic_src.js" type=text/javascript></SCRIPT>
<SCRIPT type=text/javascript>
<!--
if(ns4)_d.write("<scr"+"ipt language=JavaScript src=mmenuns4.js><\/scr"+"ipt>");
else _d.write("<scr"+"ipt language=JavaScript src=mmenudom.js><\/scr"+"ipt>");
-->
</SCRIPT>
<SCRIPT src="iframes_data.js" type=text/javascript></SCRIPT>
<TABLE BORDER="1" CELLPADDING="2" CELLSPACING="0" WIDTH="100%" HEIGHT="189px" bordercolor="#FFFF00">
<TR>
<TD height="166px"><IMG WIDTH="945" HEIGHT="156" BORDER="0" ALIGN="Top" SRC="WEBLOGOSIGNAAL2.jpg"></TD>
</TR>
<TR>
<TD><CENTER>
<TABLE BORDER="1" bordercolor="#CC99FF" CELLPADDING="2" CELLSPACING="0" Width="65%" height="25px">
<TR>
<TD valign="bottom"><script type="text/javascript">
with(milonic=new menuname("Main Menu")){
style=menuStyle;
top="offset=5";
position="relative";
alwaysvisible=1;
orientation="horizontal";
aI("text=Home;url=http://www.milonic.com/;status=Back To Home Page;");
aI("text=Signalement;showmenu=signalement;");
aI("text=Uitslagen;showmenu=uitslagen;");
aI("text=Agenda;showmenu=agenda;");
aI("text=CHAMP;showmenu=champ;");
aI("text=Het Signaal;showmenu=het_signaal;");
aI("text=BBNA;showmenu=bbna;");
aI("text=NBB;showmenu=nbb;");
aI("text=Sitemap;showmenu=sitemap;");
}
drawMenus();
</script>
</TD>
</TR>
</TABLE>
</CENTER>
</TD>
</TR>
</TABLE>
<p>
<TABLE BORDER="1" bordercolor="#99FFFF" CELLPADDING="0" CELLSPACING="0" WIDTH="100%">
<TR>
<TD width="116px"><iframe frameborder="1" width="116" height="90%" src="pageleft.htm" scrolling="no" name="frame1"> </iframe></TD>
<TD><iframe frameborder="1" width="100%" height="90%" marginwidth="20" marginheight="10" src="start_body.htm" scrolling="auto" name="frame2"> </iframe></TD>
</TR>
</TABLE>
<p>
<TABLE id=AutoNumber1 style="BORDER-COLLAPSE: collapse" cellSpacing=0
cellPadding=0 width="100%" border=1 bordercolor="#ffffff">
<TBODY>
<TR>
<TD width="20%">
<P align=center><IMG height=30
src="pagedown_files/miloniclogo_tran_80x30.gif" width=80 border=0
href="http://www.milonic.com/" <a></P></TD>
<TD width="20%"> </TD>
<TD width="20%"> </TD>
<TD width="20%"> </TD>
<TD width="20%"> </TD></TR></TBODY></TABLE>
</BODY></HTML>
MENU DATA CODE:
Code:
/*
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 *******
*/
function loadMultiFrames()
{
if (arguments.length > 0)
{
for (var i=0; i<arguments.length; i++)
{
params = arguments[i].split("=");
if (params[0].length > 0 && params[1].length > 0) parent[params[0]].location = params[1];
}
}
}
_menuCloseDelay=10000 // The time delay for menus to remain visible on mouse out
_menuOpenDelay=150 // The time delay before menus open on mouse over
_subOffsetTop=10 // Sub menu top offset
_subOffsetLeft=-10 // Sub menu left offset
with(menuStyle=new mm_style()){
onbgcolor="transparent";
oncolor="#FE0107";
offbgcolor="transparent";
offcolor="#062F0C";
bordercolor="#8A867A";
borderstyle="solid";
borderwidth=1;
separatorcolor="#000000";
separatorsize=1;
padding=5;
fontsize="75%";
fontstyle="normal";
fontweight="bold";
fontfamily="Verdana, Tahoma, Arial, Helvetica";
subimage="arrowdn.gif";
subimagepadding=2;
menubgimage='BACKGR5.gif';
overfilter="Shadow(color='#777777', Direction=135, Strength=5)";
}
with(subStyle=new mm_style()){
onbgcolor="#E8FFE8";
oncolor="#062F0C";
offbgcolor="#062F0C";
offcolor="#fbffe5";
bordercolor="#000000";
borderstyle="solid";
borderwidth=1;
separatorcolor="#2D729D";
separatorsize=0;
padding=4;
fontsize=12;
fontstyle="normal";
fontweight="bold";
fontfamily="Verdana, Tahoma, Arial, Helvetica";
subimage="arrow.gif";
subimagepadding=2;
itemwidth=100;
menuwidth=100;
overfilter="Shadow(color='#777777', Direction=135, Strength=5)";
}
with(milonic=new menuname("signalement")){
style=subStyle;
overflow="scroll";
menuwidth=100;
itemwidth=100;
aI("text=nr. 8;url=javascript:loadMultiFrames(\"frame1=http://www.yahoo.com/\",\"frame2=http://www.google.com/\");");
aI("text=nr. 7;url=javascript:loadMultiFrames(\"frame1=leftuitslag.htm/\",\"frame2=agenda.htm/\");");
aI("text=All Horizontal Menus;url=/menusample25.php;");
aI("text=Using The Popup Menu Function Fixed Position;url=/menusample3.php;");
aI("text=Using The Popup Menu Function Positioned by Images;url=/menusample24.php;");
aI("text=Image Map Sample;url=/menusample4.php;");
aI("text=Multiple Styles;url=/menusample5.php;");
aI("text=Menus and Tool Tips;url=/menusample6.php;");
aI("text=Multiple Colored Menus;url=/menusample7.php;");
aI("text=Menu Items as Headers;url=/menusample8.php;");
aI("text=Windows XP Style Menus;url=/menusample12.php;");
aI("text=Windows 98 Style Menus;url=/menusample13.php;");
aI("text=Relative Positioning (Table Bound);url=/menusample9.php;");
aI("text=Follow Scrolling;url=/menusample10.php;");
aI("text=Opening Windows & Frames;url=/menusample11.php;");
aI("text=Hiding DIVs when displaying menus;url=/menusample14.php;");
aI("text=Activating MouseOver & MouseOut Functions;url=/menusample15.php;");
aI("text=Dynamic Dragable Menus;url=/menusample22.php;");
aI("text=Positioning with screenposition & offsets;url=/menusample23.php;");
aI("text=100% Width Span Menu;url=/menusample26.php;");
aI("text=Context Right Click Menu;url=/menusample27.php;");
aI("text=Static Images Sample;url=/menusample16.php;");
aI("text=Rollover/swap Images;url=/menusample17.php;");
aI("text=Menus built from images;url=/menusample18.php;");
aI("text=Images as Menu Backgrounds;url=/menusample19.php;");
aI("text=Background Menu Item Images;url=/menusample20.php;");
}
with(milonic=new menuname("uitslagen")){
style=subStyle;
aI("text=Product Purchasing Page;url=http://www.milonic.com/cbuy.php;");
aI("text=Contact Us;url=http://www.milonic.com/contactus.php;");
aI("text=Newsletter Subscription;url=http://www.milonic.com/newsletter.php;");
aI("text=FAQ;url=http://www.milonic.com/menufaq.php;");
aI("text=Discussion Forum;url=http://www.milonic.com/forum/;");
aI("text=Software License Agreement;url=http://www.milonic.com/license.php;");
aI("text=Privacy Policy;url=http://www.milonic.com/privacy.php;");
}
with(milonic=new menuname("agenda")){
style=subStyle;
aI("text=(aq) Web Hosting;url=http://www.a-q.co.uk/;status=(aq) Web Server Hosting & Services;");
aI("text=SMS 2 Email;url=http://www.sms2email.com/;");
aI("text=WebSmith;url=websmith;");
}
with(milonic=new menuname("champ")){
style=subStyle;
aI("text=Apache Web Server;url=http://www.apache.org/;status=Apache Web Server, the basis of Milonic's Web Site;");
aI("text=MySQL Database Server;url=http://ww.mysql.com/;status=MySQL, Milonic's Prefered Choice of Database Server;");
aI("text=PHP - Development;url=http://www.php.net/;status=PHP - Web Server Scripting as used by Milonic;");
aI("text=phpBB Web Forum System;url=http://www.phpbb.net/;status=PHP Based Web Forum, Milonic's Recommended Forum Software;");
aI("text=Anti Spam Tools;showmenu=Anti Spam;status=Anti Spam Solutions, as used by Milonic;");
}
with(milonic=new menuname("het_signaal")){
style=subStyle;
aI("text=Spam Cop;url=http://www.spamcop.net/;");
aI("text=Mime Defang;url=http://www.mimedefang.org/;");
aI("text=Spam Assassin;url=http://www.spamassassin.org/;");
}
with(milonic=new menuname("bbna")){
style=subStyle;
aI("text=(aq) Web Hosting;url=http://www.a-q.co.uk/;status=(aq) Web Server Hosting & Services;");
aI("text=SMS 2 Email;url=http://www.sms2email.com/;");
aI("text=WebSmith;url=websmith;");
}
with(milonic=new menuname("nbb")){
style=subStyle;
aI("text=(aq) Web Hosting;url=http://www.a-q.co.uk/;status=(aq) Web Server Hosting & Services;");
aI("text=SMS 2 Email;url=http://www.sms2email.com/;");
aI("text=WebSmith;url=websmith;");
}
with(milonic=new menuname("sitemap")){
style=subStyle;
aI("text=(aq) Web Hosting;url=http://www.a-q.co.uk/;status=(aq) Web Server Hosting & Services;");
aI("text=SMS 2 Email;url=http://www.sms2email.com/;");
aI("text=WebSmith;url=websmith;");
}
drawMenus();
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 *******
*/
function loadMultiFrames()
{
if (arguments.length > 0)
{
for (var i=0; i<arguments.length; i++)
{
params = arguments[i].split("=");
if (params[0].length > 0 && params[1].length > 0) parent[params[0]].location = params[1];
}
}
}
_menuCloseDelay=10000 // The time delay for menus to remain visible on mouse out
_menuOpenDelay=150 // The time delay before menus open on mouse over
_subOffsetTop=10 // Sub menu top offset
_subOffsetLeft=-10 // Sub menu left offset
with(menuStyle=new mm_style()){
onbgcolor="transparent";
oncolor="#FE0107";
offbgcolor="transparent";
offcolor="#062F0C";
bordercolor="#8A867A";
borderstyle="solid";
borderwidth=1;
separatorcolor="#000000";
separatorsize=1;
padding=5;
fontsize="75%";
fontstyle="normal";
fontweight="bold";
fontfamily="Verdana, Tahoma, Arial, Helvetica";
subimage="arrowdn.gif";
subimagepadding=2;
menubgimage='BACKGR5.gif';
overfilter="Shadow(color='#777777', Direction=135, Strength=5)";
}
with(subStyle=new mm_style()){
onbgcolor="#E8FFE8";
oncolor="#062F0C";
offbgcolor="#062F0C";
offcolor="#fbffe5";
bordercolor="#000000";
borderstyle="solid";
borderwidth=1;
separatorcolor="#2D729D";
separatorsize=0;
padding=4;
fontsize=12;
fontstyle="normal";
fontweight="bold";
fontfamily="Verdana, Tahoma, Arial, Helvetica";
subimage="arrow.gif";
subimagepadding=2;
itemwidth=100;
menuwidth=100;
overfilter="Shadow(color='#777777', Direction=135, Strength=5)";
}
with(milonic=new menuname("signalement")){
style=subStyle;
overflow="scroll";
menuwidth=100;
itemwidth=100;
aI("text=nr. 8;url=javascript:loadMultiFrames(\"frame1=http://www.yahoo.com/\",\"frame2=http://www.google.com/\");");
aI("text=nr. 7;url=javascript:loadMultiFrames(\"frame1=leftuitslag.htm/\",\"frame2=agenda.htm/\");");
aI("text=All Horizontal Menus;url=/menusample25.php;");
aI("text=Using The Popup Menu Function Fixed Position;url=/menusample3.php;");
aI("text=Using The Popup Menu Function Positioned by Images;url=/menusample24.php;");
aI("text=Image Map Sample;url=/menusample4.php;");
aI("text=Multiple Styles;url=/menusample5.php;");
aI("text=Menus and Tool Tips;url=/menusample6.php;");
aI("text=Multiple Colored Menus;url=/menusample7.php;");
aI("text=Menu Items as Headers;url=/menusample8.php;");
aI("text=Windows XP Style Menus;url=/menusample12.php;");
aI("text=Windows 98 Style Menus;url=/menusample13.php;");
aI("text=Relative Positioning (Table Bound);url=/menusample9.php;");
aI("text=Follow Scrolling;url=/menusample10.php;");
aI("text=Opening Windows & Frames;url=/menusample11.php;");
aI("text=Hiding DIVs when displaying menus;url=/menusample14.php;");
aI("text=Activating MouseOver & MouseOut Functions;url=/menusample15.php;");
aI("text=Dynamic Dragable Menus;url=/menusample22.php;");
aI("text=Positioning with screenposition & offsets;url=/menusample23.php;");
aI("text=100% Width Span Menu;url=/menusample26.php;");
aI("text=Context Right Click Menu;url=/menusample27.php;");
aI("text=Static Images Sample;url=/menusample16.php;");
aI("text=Rollover/swap Images;url=/menusample17.php;");
aI("text=Menus built from images;url=/menusample18.php;");
aI("text=Images as Menu Backgrounds;url=/menusample19.php;");
aI("text=Background Menu Item Images;url=/menusample20.php;");
}
with(milonic=new menuname("uitslagen")){
style=subStyle;
aI("text=Product Purchasing Page;url=http://www.milonic.com/cbuy.php;");
aI("text=Contact Us;url=http://www.milonic.com/contactus.php;");
aI("text=Newsletter Subscription;url=http://www.milonic.com/newsletter.php;");
aI("text=FAQ;url=http://www.milonic.com/menufaq.php;");
aI("text=Discussion Forum;url=http://www.milonic.com/forum/;");
aI("text=Software License Agreement;url=http://www.milonic.com/license.php;");
aI("text=Privacy Policy;url=http://www.milonic.com/privacy.php;");
}
with(milonic=new menuname("agenda")){
style=subStyle;
aI("text=(aq) Web Hosting;url=http://www.a-q.co.uk/;status=(aq) Web Server Hosting & Services;");
aI("text=SMS 2 Email;url=http://www.sms2email.com/;");
aI("text=WebSmith;url=websmith;");
}
with(milonic=new menuname("champ")){
style=subStyle;
aI("text=Apache Web Server;url=http://www.apache.org/;status=Apache Web Server, the basis of Milonic's Web Site;");
aI("text=MySQL Database Server;url=http://ww.mysql.com/;status=MySQL, Milonic's Prefered Choice of Database Server;");
aI("text=PHP - Development;url=http://www.php.net/;status=PHP - Web Server Scripting as used by Milonic;");
aI("text=phpBB Web Forum System;url=http://www.phpbb.net/;status=PHP Based Web Forum, Milonic's Recommended Forum Software;");
aI("text=Anti Spam Tools;showmenu=Anti Spam;status=Anti Spam Solutions, as used by Milonic;");
}
with(milonic=new menuname("het_signaal")){
style=subStyle;
aI("text=Spam Cop;url=http://www.spamcop.net/;");
aI("text=Mime Defang;url=http://www.mimedefang.org/;");
aI("text=Spam Assassin;url=http://www.spamassassin.org/;");
}
with(milonic=new menuname("bbna")){
style=subStyle;
aI("text=(aq) Web Hosting;url=http://www.a-q.co.uk/;status=(aq) Web Server Hosting & Services;");
aI("text=SMS 2 Email;url=http://www.sms2email.com/;");
aI("text=WebSmith;url=websmith;");
}
with(milonic=new menuname("nbb")){
style=subStyle;
aI("text=(aq) Web Hosting;url=http://www.a-q.co.uk/;status=(aq) Web Server Hosting & Services;");
aI("text=SMS 2 Email;url=http://www.sms2email.com/;");
aI("text=WebSmith;url=websmith;");
}
with(milonic=new menuname("sitemap")){
style=subStyle;
aI("text=(aq) Web Hosting;url=http://www.a-q.co.uk/;status=(aq) Web Server Hosting & Services;");
aI("text=SMS 2 Email;url=http://www.sms2email.com/;");
aI("text=WebSmith;url=websmith;");
}
drawMenus();
A couple of things. To have your layout I used the table bound sample of the menu which requires a couple of things, like removing the main menu from the menu data.js file and putting it in the table. You might want to take a look at that sample and directions to see what I've done. Also, I've put colored borders around the tables so you can see them. I used your menu and background for the main, and under the Signalement the first two links are the links you have, but one has a google and a yahoo page to show the dual loading, the other has your agenda and the leftuitslag. The rest of the data is from the download sample, although I added enough menus so there would be the equivalent of what you have.
Hope this helps.
Ruth