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.a ll[...].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,ob j){
if(meth=="show" ){
document.all[obj].style.visibili ty = 'visible';
}else if(meth=="hide" ){
document.all[obj].style.visibili ty = '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="mainTitl e">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="mainTitl e">Some Text</span></div>
<!-- -->
<img src="q.gif" width="10" height="10"
onMouseOver="he lpWin('show','b bc');"
onMouseOut="hel pWin('hide','bb c');">
<img src="q.gif" width="10" height="10"
onMouseOver="he lpWin('show','t oc');"
onMouseOut="hel pWin('hide','to c');">
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.a ll[...].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,ob j){
if(meth=="show" ){
document.all[obj].style.visibili ty = 'visible';
}else if(meth=="hide" ){
document.all[obj].style.visibili ty = '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="mainTitl e">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="mainTitl e">Some Text</span></div>
<!-- -->
<img src="q.gif" width="10" height="10"
onMouseOver="he lpWin('show','b bc');"
onMouseOut="hel pWin('hide','bb c');">
<img src="q.gif" width="10" height="10"
onMouseOver="he lpWin('show','t oc');"
onMouseOut="hel pWin('hide','to c');">
Comment