Forum Moderators: not2easy
Defining Layer
"<div id="Autonomy" style="position:relative; left:556px; top:260px; width:207px; height:125px; z-index:2; visibility: hidden;"></div>"
Image that user is going to mouseover to show the layer
"<img src="/images/autonomy_off.gif" width="75" height="13" border="0" id="Image2" onmouseover="MM_showHideLayers('Autonomy','','show');MM_swapImage('Image2','','/images/autonomy_on.gif',1)" onmouseout="MM_swapImgRestore();MM_showHideLayers('Autonomy','','hide')" />"
Can someone help me to get this to work proper. If their is a easier way to do it please let me know.
It's hard to provide a solution to your problem without seen the bit of javascript code that activates the dispaly of that layer.
Instead of "show" and "hide" the visibility property should be set to "visible" and "hidden" in your javascript. So you need to look into your javascript.
Let me know how it goes.
<script type="text/JavaScript">
<!--
function MM_findObj(n, d) { //v4.01
var p,i,x; if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {
d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];
for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document);
if(!x && d.getElementById) x=d.getElementById(n); return x;
}
function MM_showHideLayers() { //v6.0
var i,p,v,obj,args=MM_showHideLayers.arguments;
for (i=0; i<(args.length-2); i+=3) if ((obj=MM_findObj(args[i]))!=null) { v=args[i+2];
if (obj.style) { obj=obj.style; v=(v=='show')?'visible':(v=='hide')?'hidden':v; }
obj.visibility=v; }
}
It also creates a CSS section of code. I have been trying to modify that to position the layer but as soon as I change the position to relative it throws the whole page off. This is what it usually looks like
#SRED {
position:absolute;
left:556px;
top:260px;
width:207px;
height:125px;
z-index:1;
visibility: hidden;
}
It works with the mouse over but is doesn't stay where I want it to stay on the page.