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:41
Doin' my head in... closeonclick & unsupported framecode
Poster: Kevin __at__ Kasper
Dated: Tuesday February 24 2004 - 10:31:40 GMT
Hi all!
I'm having a "big" problem with the unsupported framecode where none of the functions I use to close the submenu on click works...
Let me explain my situation/setup:
site url: http://www.connections.be/nl/index_v7.shtml
- site is divided in frames (can't change that ) so i'm using the unsupported code posted here on the forum
- leftframe = mainmenu
- mainFrame = an (100%) Iframe which contains the contentpages (needed to let the menu work when there is a page in our frame which isn't hosted by us)
this is my main menu data file
this is my submenu data file which is implented in the iframe
I've tried everything.... closeonclick in the individual menu item properties, closeonclick in the submenu style properties, through a closefunction (Submenuclose) which gets activated with the 'clickfunction' or with the document.onclick in the iframe file
code for the iframe file:
Code:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<title>Untitled Document</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<style type="text/css">
<!--
iframe {
border: 0px none #FFFFFF;
}
-->
</style>
</head>
<body><SCRIPT language="JavaScript" src="/scripts/v7_menu/milonic_src.js" type="text/javascript"></SCRIPT>
<script language="JavaScript" type="text/JavaScript">
if(ns4)_d.write("<scr"+"ipt language='JavaScript' src='\/scripts\/v7_menu\/mmenuns4.js'><\/scr"+"ipt>");
else _d.write("<scr"+"ipt language='JavaScript' src='\/scripts\/v7_menu\/mmenudom.js'><\/scr"+"ipt>");
</script><SCRIPT language="JavaScript" src="/scripts/v7_menu/menu_data_subs_nl.js" type="text/javascript"></SCRIPT>
<SCRIPT language="JavaScript" src="/scripts/v7_menu/divhider.js" type="text/javascript">
</SCRIPT>
<SCRIPT language="javascript" type="text/Javascript">
// document.onClick = "parent.frames['mainIFrame'].popdown();"
</SCRIPT>
<div id="div1" style="position:relative" align="right"><iframe src="navigation/main_v7_nl.shtml" name="mainFrame" width="592" marginwidth="0" height="100%" marginheight="0" scrolling="auto" frameborder="0" hspace="0" vspace="0" id="mainFrame">Your
browser does not support Iframes, please upgrade to view this site correctly</iframe></div>
</body>
</html>
<html>
<head>
<title>Untitled Document</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<style type="text/css">
<!--
iframe {
border: 0px none #FFFFFF;
}
-->
</style>
</head>
<body><SCRIPT language="JavaScript" src="/scripts/v7_menu/milonic_src.js" type="text/javascript"></SCRIPT>
<script language="JavaScript" type="text/JavaScript">
if(ns4)_d.write("<scr"+"ipt language='JavaScript' src='\/scripts\/v7_menu\/mmenuns4.js'><\/scr"+"ipt>");
else _d.write("<scr"+"ipt language='JavaScript' src='\/scripts\/v7_menu\/mmenudom.js'><\/scr"+"ipt>");
</script><SCRIPT language="JavaScript" src="/scripts/v7_menu/menu_data_subs_nl.js" type="text/javascript"></SCRIPT>
<SCRIPT language="JavaScript" src="/scripts/v7_menu/divhider.js" type="text/javascript">
</SCRIPT>
<SCRIPT language="javascript" type="text/Javascript">
// document.onClick = "parent.frames['mainIFrame'].popdown();"
</SCRIPT>
<div id="div1" style="position:relative" align="right"><iframe src="navigation/main_v7_nl.shtml" name="mainFrame" width="592" marginwidth="0" height="100%" marginheight="0" scrolling="auto" frameborder="0" hspace="0" vspace="0" id="mainFrame">Your
browser does not support Iframes, please upgrade to view this site correctly</iframe></div>
</body>
</html>
is there anyone who could help me on this? I've already lost lotz of hours on this menu and I really need to get it working now so any suggestions are HIGHLY appreciated! thanks in advance!
Poster: kevin3442
Dated: Wednesday February 25 2004 - 0:38:59 GMT
Just a quick thought. Instead of calling popdown() in the frame containing your submenus, try calling closeAllMenus(). Worth a try...
Kevin
Poster: Maz
Dated: Wednesday February 25 2004 - 15:54:21 GMT
I've never used frames and not good at java, so I'll throw out some observations incase anyone knows.
Assuming I'm looking at the correct menu on the left side.
I don't understand why you have 2 menu data files. Probably you shouldn't repeat styles for the same menu.
You have js or flash type change effect up against the menu, that is causing the submenus to act irrational, its not a good idea to place the 2 so close to each other. Some browsers can't handle it.
Regards,
maz
Poster: Kevin __at__ Kasper
Dated: Wednesday February 25 2004 - 16:01:48 GMT
maz wrote:
I've never used frames and not good at java, so I'll throw out some observations incase anyone knows.
Assuming I'm looking at the correct menu on the left side.
I don't understand why you have 2 menu data files. Probably you shouldn't repeat styles for the same menu.
Assuming I'm looking at the correct menu on the left side.
I don't understand why you have 2 menu data files. Probably you shouldn't repeat styles for the same menu.
2 frames = 2 data files ... one for the main file and one for the subs
maz wrote:
You have js or flash type change effect up against the menu, that is causing the submenus to act irrational, its not a good idea to place the 2 so close to each other. Some browsers can't handle it.
I'm not sure what you mean by this?