need to add a delay to show and hide layers
i have following code generated dreamweaver 8 designed show , hide menu layer on mouseover , mouseout event couple different areas of screen. these work great. i'd know add delay - event triggering hide of layer. need syntax. suspect it's not complicated, far javascript expert. please - thanks!
*********************** code ***********************
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]; (i=0;!x&&i<d.forms.length;i++) x=d.forms [n];
for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=mm_findobj(n,d.layers.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;
(i=0; i<(args.length-2); i+=3) if ((obj=mm_findobj(args ))!=null) { v=args[i+2];
if (obj.style) { obj=obj.style; v=(v=='show')?'visible' v=='hide')?'hidden':v; }
obj.visibility=v; }
}
*********************** code generating trigger ***********************
<img src="images/solutions.gif" alt="" name="solutions" width=146 height=38 border=0 onmouseover="mm_showhidelayers('poptop','','show','popsub','','show')" onmouseout="mm_showhidelayers('poptop','','hide','popsub','','hide')">
****************************** code end *********************
thanks available.
paul
*********************** code ***********************
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]; (i=0;!x&&i<d.forms.length;i++) x=d.forms [n];
for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=mm_findobj(n,d.layers.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;
(i=0; i<(args.length-2); i+=3) if ((obj=mm_findobj(args ))!=null) { v=args[i+2];
if (obj.style) { obj=obj.style; v=(v=='show')?'visible' v=='hide')?'hidden':v; }
obj.visibility=v; }
}
*********************** code generating trigger ***********************
<img src="images/solutions.gif" alt="" name="solutions" width=146 height=38 border=0 onmouseover="mm_showhidelayers('poptop','','show','popsub','','show')" onmouseout="mm_showhidelayers('poptop','','hide','popsub','','hide')">
****************************** code end *********************
thanks available.
paul
More discussions in Dynamic HTML General Discussion (read only)
adobe
Comments
Post a Comment