trouble with layers

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I am creating a keyword index with the top of the page as buttons for the
letters of the alphabet then each button has a layer with the associated
keywords for that letter. When I test the page in my browser I am not able
to move my mouse to the bottom of the list I created in the layer before it
disappears (it is set to change properties on mouseout - but it disappears
before then). Is there any way I can set it up to allow me to move my mouse
through the entire length of the list to select one of the words further down?
 
Can you post a link to your page, please?

The solution would be to use a 'closer' element, but I need to see what your
page looks like to suggest the best option.
 
It is not a published site - it is for a company intranet and not published
to that site yet - can I send you a screenshot?
 
No, thanks. A screenshot will not give me the code. Do you have some
webspace somewhere? Or worst case - paste the code into a reply?
 
Here is the code on one of the child layers:

<div style="position: absolute; left: 82px; top: 11px; width: 151px; height:
298px; z-index: 2; visibility: hidden" id="B_Keywords"
onmouseout="FP_changePropRestore()"
onmouseover="FP_changeProp(/*id*/'B_Keywords',1,'style.visibility','visible')">
<font face="Arial"><a href="Babies_R_Us.htm">Babies 'R' Us</a></font><p>
<font face="Arial"><a href="BLP.htm">Balance Liquidation
Program</a></font></p>


<p><font face="Arial"><a href="Blnce_Pay_Off.htm">Balance Pay
Off</a></font></p>
<p><font face="Arial"><a href="Bank_NY.htm">Bank of New York</a></font></p>
<p><font face="Arial"><a href="BKR.htm">Bankruptcy</a></font></p>
<p><font face="Arial"><a href="BP.htm">BP</a></font></p>
<p><font face="Arial"><a href="Business_continuity.htm">Business
Continuity</a></font><p> </div>

Here is the code from the top of the page:

function FP_preloadImgs() {//v1.0
var d=document,a=arguments; if(!d.FP_imgs) d.FP_imgs=new Array();
for(var i=0; i<a.length; i++) { d.FP_imgs=new Image;
d.FP_imgs.src=a; }
}
function FP_getObjectByID(id,o) {//v1.0
var c,el,els,f,m,n; if(!o)o=document; if(o.getElementById)
el=o.getElementById(id);
else if(o.layers) c=o.layers; else if(o.all) el=o.all[id]; if(el) return el;
if(o.id==id || o.name==id) return o; if(o.childNodes) c=o.childNodes; if(c)
for(n=0; n<c.length; n++) { el=FP_getObjectByID(id,c[n]); if(el) return el; }
f=o.forms; if(f) for(n=0; n<f.length; n++) { els=f[n].elements;
for(m=0; m<els.length; m++){ el=FP_getObjectByID(id,els[n]); if(el) return
el; } }
return null;
}

function FP_changePropRestore() {//v1.0
var d=document,x; if(d.$cpe) { for(i=0; i<d.$cpe.length; i++) { x=d.$cpe;
if(x.v=="") x.v=""; eval("x."+x.n+"=x.v"); } d.$cpe=null; }
}

function FP_changeProp() {//v1.0
var args=arguments,d=document,i,j,id=args[0],o=FP_getObjectByID(id),s,ao,v,x;
d.$cpe=new Array(); if(o) for(i=2; i<args.length; i+=2) { v=args[i+1];
s="o";
ao=args.split("."); for(j=0; j<ao.length; j++) { s+="."+ao[j];
if(null==eval(s)) {
s=null; break; } } x=new Object; x.o=o; x.n=new Array(); x.v=new Array();
x.n[x.n.length]=s; eval("x.v[x.v.length]="+s); d.$cpe[d.$cpe.length]=x;
if(s) eval(s+"=v"); }
}
// -->
</script>
</head>

<body onload="FP_preloadImgs(/*url*/'button21.jpg', /*url*/'button24.jpg',
/*url*/'button2D.jpg', /*url*/'button30.jpg', /*url*/'button33.jpg',
/*url*/'button36.jpg', /*url*/'button39.jpg', /*url*/'button3C.jpg',
/*url*/'button3F.jpg', /*url*/'button42.jpg', /*url*/'button45.jpg',
/*url*/'button48.jpg', /*url*/'button4B.jpg', /*url*/'button4E.jpg',
/*url*/'button51.jpg', /*url*/'button54.jpg', /*url*/'button57.jpg',
/*url*/'button5A.jpg', /*url*/'button5D.jpg', /*url*/'button60.jpg',
/*url*/'button63.jpg', /*url*/'button66.jpg', /*url*/'button69.jpg',
/*url*/'button6C.jpg', /*url*/'button6F.jpg')">

Thank you!
 
What triggers the div to become visible? I note that you have the
changeProperty behavior applied *to the hidden* div - is that the only thing
that triggers the visibilty change? If so, then that's why it doesn't stay
open. Adding event handlers to things like <div> tags and <p> tags and
<span> tags is pretty hit-or-miss. I really would need to see more body
code, though - can you put the page somewhere?
 
Back
Top