E
Eclectic
I have a couple of layers that are hidden.
When an image is moused over, I want to show the appropriate layer,
then hide it on mouseOut.
The problem is, I get an error telling me "document.all[...].style is
not an object" for whatever layer I have created first. It seems as
though when the second layer is created, it overwrites the first one
....
This has been driving me NUTS! Any suggestions?
Heres my code:
javascript :
function helpWin(meth,obj){
if(meth=="show"){
document.all[obj].style.visibility = 'visible';
}else if(meth=="hide"){
document.all[obj].style.visibility = 'hidden';
}
}
HTML :
<!-- -->
<div id="bcc" style="position:absolute; border: 1px solid balck;
left:420px; top:0px; width:300px; height:50px; z-index:1;
background-color: #FFFFFF; layer-background-color: #FFFFFF;
visibility: hidden;">
<span class="mainTitle">Some Text</span></div>
<!-- -->
<div id="toc" style="position:absolute; border: 1px solid balck;
left:420px; top:0px; width:300px; height:50px; z-index:2;
background-color: #FFFFFF; layer-background-color: #FFFFFF;
visibility: hidden;">
<span class="mainTitle">Some Text</span></div>
<!-- -->
<img src="q.gif" width="10" height="10"
onMouseOver="helpWin('show','bbc');"
onMouseOut="helpWin('hide','bbc');">
<img src="q.gif" width="10" height="10"
onMouseOver="helpWin('show','toc');"
onMouseOut="helpWin('hide','toc');">
When an image is moused over, I want to show the appropriate layer,
then hide it on mouseOut.
The problem is, I get an error telling me "document.all[...].style is
not an object" for whatever layer I have created first. It seems as
though when the second layer is created, it overwrites the first one
....
This has been driving me NUTS! Any suggestions?
Heres my code:
javascript :
function helpWin(meth,obj){
if(meth=="show"){
document.all[obj].style.visibility = 'visible';
}else if(meth=="hide"){
document.all[obj].style.visibility = 'hidden';
}
}
HTML :
<!-- -->
<div id="bcc" style="position:absolute; border: 1px solid balck;
left:420px; top:0px; width:300px; height:50px; z-index:1;
background-color: #FFFFFF; layer-background-color: #FFFFFF;
visibility: hidden;">
<span class="mainTitle">Some Text</span></div>
<!-- -->
<div id="toc" style="position:absolute; border: 1px solid balck;
left:420px; top:0px; width:300px; height:50px; z-index:2;
background-color: #FFFFFF; layer-background-color: #FFFFFF;
visibility: hidden;">
<span class="mainTitle">Some Text</span></div>
<!-- -->
<img src="q.gif" width="10" height="10"
onMouseOver="helpWin('show','bbc');"
onMouseOut="helpWin('hide','bbc');">
<img src="q.gif" width="10" height="10"
onMouseOver="helpWin('show','toc');"
onMouseOut="helpWin('hide','toc');">