Forum Moderators: open
I wanna mouseover an image and then open a layer / <div> element in another frame.
yes that's right i'm making a drop down menu but need it to seem like it can cross frame boundaries...
any advice is appreciated....thx
lets say your right frame is called 'rightFrame' and you have a function in that frame that shows/hides the layer called showLayer(bool).
in the left frame you can call window.top.rightFrame.showLayer(true);
If you want the function in the left frame you can call it as normal but wherever you reference the layer in the right hand frame (by document.blahblah)
you need to use the same window pointer as above to get to the layer in the right, i.e. window.top.rightFrame.document.blahblah.
Hope that helps. If you need any elaboration just give us a shout.
Josh
thanx for the help. appreciate it.
All this in the same document.
--------------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][1] + "</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-----------------