Have five layers that are fixed to buttons the user clicks to change layers. I use a function which uses an "if (value == number){ show layer1}
The only problem is on loading the page all layers are hidden. Then, if I have layer1 as default with body onload, every time you switch pages that particular layer pops up until you hit one of the buttons. Does anyone know if I could do a function for body onLoad that checks to see if a layer is visible and/or the button has been clicked and then passes the variable into the body onLoad?
function changeLayer(){
if(document.DocLocation.visibility="show"
{showOrHide(0);}
else if(document.DocPoc.visibility="show"
{showOrHide(1);}
else if(document.DocComponent.visibility="show"
{showOrHide(2);}
else if(document.DocSoftware.visibility="show"
{showOrHide(3);}
else if(document.DocSwitch.visibility="show"
{showOrHide(4);}
}
//-->
</SCRIPT>
</head>
<body onLoad="showOrHide();" onUnload="changeLayer();" >
This still only shows layer one. I have to script for netscape browsers too. Any ideas?
Thanks!
Va
The only problem is on loading the page all layers are hidden. Then, if I have layer1 as default with body onload, every time you switch pages that particular layer pops up until you hit one of the buttons. Does anyone know if I could do a function for body onLoad that checks to see if a layer is visible and/or the button has been clicked and then passes the variable into the body onLoad?
function changeLayer(){
if(document.DocLocation.visibility="show"
{showOrHide(0);}
else if(document.DocPoc.visibility="show"
{showOrHide(1);}
else if(document.DocComponent.visibility="show"
{showOrHide(2);}
else if(document.DocSoftware.visibility="show"
{showOrHide(3);}
else if(document.DocSwitch.visibility="show"
{showOrHide(4);}
}
//-->
</SCRIPT>
</head>
<body onLoad="showOrHide();" onUnload="changeLayer();" >
This still only shows layer one. I have to script for netscape browsers too. Any ideas?
Thanks!
Va