Milonic provide full featured pull down web menus for some of the worlds largest companies
click here to see what it can do for you

Download Milonic DHTML Menu
Buy Milonic DHTML Menu

Back To Start Of Archive
Taken From The Forum: Help & Support for DHTML Menu Version 5+
Forum Topic: Click to view post
Last Updated: Thursday February 8 2018 - 06:02:02

Problems with DIV hider function (Iframe/Menu interference)


Poster: pere_mr __at__ hotmail.com
Dated: Tuesday August 3 2004 - 14:42:42 BST

I am attempting to implement on our website the DIV hider function to solve the interference between an iframe and the Milonic menu. This problem occurs in, at least, the following browsers: IE 5.0/Win, Opera 7/Win and IE/Mac http://www.opcw.org/index18.html
I have several queries:

(1) I have seen 2 versions of the divhider.js file. There is a discrepancy in 1 of the lines. Which one is the good one?

Milonic website downloaded 31 July
if(M_mnu>-1&&M_mnu==_mnu){
Email I received from Andy in mid June
if(M_mnu&&M_mnu==_mnu){
===============================================
(2) You say that I need to declare the menus at the beginning of divhider.js Do I need to declare all menus and submenus? Or only parent/top menu items?
===============================================
(3)
I notice that the file divhider.js contains this condition

if(op7||ie55||ns6||ns7)return

I want to make sure that the Iframe/Menu interference is solved (hiding the Iframe) also in IE5/Win and IE/Mac. Is the above condition complete then?
===============================================
(4) OK, I've customised and saved the divhider.js file under my bin directory. But where do I include a reference to it from the homepage? http://www.opcw.org/index18_maincontents.html
===============================================
(5) I have applied the instructions contained in your message (you can read the source in the 2 appeneded files below) but the results are bad:
-In Opera 7.51, the menu was still being cut off when it hit the Iframe; the browser did not read the function to hide the DIV
-In Netscape 7.1, the iframe and its contents would not show at all at any time! Only the top frame of the page and the menu on the left would display.

Please help

I am enclosing the contents of "divhider.js" and "index18_bottom_frame.html"

=====index18_bottom_frame.html==where the menu and the Iframe are displayed=====
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<title>Welcome to the Organisation for the Prohibition of Chemical Weapons Web
Site</title>
<base target="contentsFrame">
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<link href="adm/css/opcw_sections_pmr.css" rel="stylesheet" type="text/css">
<style>a:link {color:#000000;text-decoration:none}
a:visited {color:#000000;text-decoration:none}
a:hover {color:#005dbe;text-decoration:underline}
}
</style>
<script language="JavaScript1.2" src="bin/messages.js"></script>
<script language="JavaScript" src="bin/rdm_image.js"></script>
<SCRIPT language=JavaScript src="bin/divhider.js" type=text/javascript></SCRIPT>
<SCRIPT language=JavaScript src="bin/milonic_src.js" type=text/javascript></SCRIPT>
<script language=JavaScript>
if(ns4)_d.write("<scr"+"ipt language=JavaScript src=bin/mmenuns4.js><\/scr"+"ipt>");
else _d.write("<scr"+"ipt language=JavaScript src=bin/mmenudom.js><\/scr"+"ipt>");
</script>
<SCRIPT language=JavaScript src="bin/nav_menu_data.js" type=text/javascript></SCRIPT>
</head>
<body scroll="no" bgcolor="#FFFFFF" leftmargin="0" topmargin="0" marginwidth="0" marginheight="

0">
<table height="100%" border="0" align="left" cellpadding="0">
<tr height="100%" align="left" valign="top">
<td width="145" align="left" valign="top" nowrap>
</td>
<td align="left" valign="top" width="100%" height="100%">
<div id=hidediv name=hidediv style="position:relative"><iframe name="contentsFrame" src

="index18_maincontents.html" frameborder="0" width="100%" height="100%" scrolling="auto" id="

contentsFrame" marginheight="3" marginwidth="6"></iframe></div>
</td>
</tr>
</table>
</body>
</html>
============

==divhider.js==========
M_hideMenus = "Main Menu->hidediv;about->hidediv;inspections->hidediv;advantages->hidediv;cwc->hidediv;cwcArticles->hidediv;cwcVerAnnexParts->hidediv;cwcRelatedConventions->hidediv;cwcIntro->hidediv;structure->hidediv;CSP->hidediv;SAB->hidediv;ConfidentialComm->hidediv;EC->hidediv;TS->hidediv;ms->hidediv;regionalMS->hidediv;cw->hidediv;chemInd->hidediv;xfer->hidediv;cwcChemInd->hidediv;chemDemil->hidediv;verAnnex->hidediv;CWCDestruct->hidediv;statusDestruct->hidediv;destructCW->hidediv;APB->hidediv;assistOverview->hidediv;assistAct->hidediv;NA->hidediv;declAdvis->hidediv;routine->hidediv;afterEIF-hidediv;beforeEIF->hidediv;ipb->hidediv;infoNA->hidediv;legal->hidediv;legPubl->hidediv;unOpcw->hidediv;admLaw->hidediv;facilAgr->hidediv;privImm->hidediv;legTech->hidediv;natlImp->hidediv;intCoop->hidediv;intCoopProg->hidediv;docs->hidediv;RCdocs->hidediv;TSdocs->hidediv;PCdocs->hidediv;CSPdocs->hidediv;cwProt->hidediv;cwtypes->hidediv;chemTerror->hidediv;annualReports->hidediv;news->hidediv;webRecentUpdates->hidediv;cdq->hidediv;Regpublicat->hidediv;calendar->hidediv;pressRel->hidediv;"

function M_hideLayer(_mnu,_show){
if(op7||ie55||ns6||ns7)return
M_hdar=M_hideMenus.split(";")
for(_Ma=0;_Ma<M_hdar.length;_Ma++){
M_hdarI=M_hdar[_Ma].split("->")
M_mnu=getMenuByName(M_hdarI[0])
if(M_mnu&&M_mnu==_mnu){
M_gm=gmobj(M_hdarI[1])

if(_show){
if(ns4)M_gm.visibility="hide"; else M_gm.style.visibility="

hidden"
}
else{
if(ns4)M_gm.visibility="show"; else M_gm.style.visibility="

visible"
}
}
}
}
============