New member, first time submission. Need to be able to show and hide fixed size layers containing text that overflows (hence, need scrollbars when text is shown). Code below works in PC browsers IE 7.0, Netscape 8.1, Opera 9.2, FireFox 2.0 and Macintosh browsers Safari 2.0, Opera 9.2, but NOT in Macintosh FireFox 2.0. Show/hide done by dblclick/click the linked text. Specific problem; the text will hide but the scroll bars stay visible in Macintosh FireFox. Appreciate some help, GAP.
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1" />
<title>Untitled Document</title>
<style type="text/css">
<!--
#Layer1 {
position:absolute;
left:10px;
top:50px;
width:100px;
height:200px;
z-index:1;
background-color: #FFFF99;
overflow: auto;
border: thin solid #000000;
}
-->
</style>
<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*[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;
for (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; }
}
//-->
</script>
</head>
<body>
<div id="Layer1">Abc defghi jklm nopqr stu vwxyz. Abc defghi jklm nopqr stu vwxyz. Abc defghi jklm nopqr stu vwxyz. Abc defghi jklm nopqr stu vwxyz. Abc defghi jklm nopqr stu vwxyz. Abc defghi jklm nopqr stu vwxyz. </div>
<p><a href="javascript:;" onclick="MM_showHideLayers('Layer1','','hide')" ondblclick="MM_showHideLayers('Layer1','','show')">DblClick to Show, Click to Hide.</a> </p>
</body>
</html>