Forum Moderators: open
The command comes from frame nr 4, and I want to write every code in frame nr 4 and only have the layer/div visible in frame nr 6
If I reference to an object in frame 6 there won't be any object there. Is there another way?
All this in the same document. ([1]edited by: tedster at 4:25 pm (utc) on Mar. 28, 2002
--------------beginning nav.doc--------
...
layerRef="parent.frames[6].document.all"
//layerRef="document.all";
//window.top.rightframe.showlayer(true)//ns
styleSwitch=".style";
visibleVar="visible";
}
}
function showHideLayerSwitch(layerName)
{
if (eval (layerRef+'["'+layerName+'"]'+styleSwitch+'.visibility == visibleVar'))
hideLayer(layerName);
else
showLayer(layerName);
}
function showLayer(layerName)
{
eval(layerRef+'["'+layerName+'"]'+styleSwitch+'.visibility="visible"');
}
....
document.writeln(" <div id="+i2+" ><ahref=\"javascript:showHideLayerSwitch('"+i2+y+"');\" style=\"…..position: absolute; z-index: "+not_hidden_z+"; left: "+not_hidden_left+"px; top: "+not_hidden_top+"px; \"> ¦ " + nav[i2]+ "</a>");
….
document.writeln("<style type=text/css>");
document.writeln("#"+(i2-1)+y+" {position: absolute; z-index: "+hidden_z+"; visibility: hidden; left: "+hidden_left+"px; top: "+hidden_top+"px;}");
document.writeln("</style>");
document.writeln("<div id="+(i2-1)+y+">");
.....
---------end nav.doc-----------------
function showLayer(layerName)
{
eval(layerRef+'["'+layerName+'"]'+styleSwitch+'.visibility="visible"');
}
function hideLayer(layerName)
{
eval(layerRef+'["'+layerName+'"]'+styleSwitch+'.visibility="hidden"');
}
//-->
</script>
</head>
<body bgcolor="#bbffgg" onload="init(); " bgproperties="fixed">
<div id=aa ><a href="javascript:showHideLayerSwitch('ab');" style="font-family:verdana; font-weight:bold ; color:black; text-decoration:none; position: absolute; z-index:100; left:30px; top:20px; ">första menyn</a>
</body>
</html>
----- End file n_top.asp ----
The following file need some code too, but I don’t want this code in the file because this frame is the target of the sub in the DIV.
----- File content.asp ------
<html>
<head>
</head>
<body>
<style type="text/css"> #ab {position: absolute; z-index: 70; visibility: hidden; left: 33px; top: 36px;}</style>
<div id=ab>
<a href=#>ab sub 1</a><br>
<a href=#>ab sub 2</a><br>
<a href=#>ab sub 3</a><br>
</div>
</body>
</html>