|
|
|||||||||
|
|||||||||
|
|||||||||
| |
|||
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Display Modes |
|
|
|
Ajax Application Generator Generate database and reporting .NET Web apps in minutes. Quickly create visually stunning, feature-rich apps that are easy to customize and ready to deploy. Download Now!
|
|
#1
|
|||
|
|||
|
Hi,
I am changing a site in order to be compatible with Netscape 6+. I want to make a <div> not visible in order to see the next one . I know that getElementByld is necessairy but i cant use it. Here is the code .... var isNetscape = (navigator.appName.substring(0,8)=="Netscape") <script...>... function noMoreFlash() { if (isNetscape) { /*code avant document.layers['animationLayer'].visibility = "hide"; */ document.getElementByld("animationLayer").style.visibility = "hidden"; /*document.layers['missionLayer'].visibility = "show";*/ document.getElementByld ("missionLayer").style.visibility = "visible"; } else ... } </script> .... <div id="animationLayer" style="position:absolute; width:554; height:402; z-index:0; left: 99px; top: -15px; background-color: #FFCC00; layer-background-color: #FFCC00; border: 1px none #000000 ; visibility: visible"> ....... </div> ... <div id="missionLayer" style="position:absolute; width:393px; height:32px; z-index:3; left: 67px; top: 12px; visibility: hidden .... </div> missionLayer and animationLayer are the id of my DIV. What i must change..??? Thanks alot, sorry for mu english |
|
#2
|
|||
|
|||
|
Not an expert on this (have only done this once with a different code), but I think that you should not use <div ....; visibility: hidden> but instead write it like this:
<div.... style="display:none"> And also try to change document.getElementByld("animationLayer").style.visibility = "hidden"; into document.getElementByld("animationLayer").style.display = "none"; I'm not able to find the sources that helped me with my code, but when I did it like this it worked with my code. (Tested with Opera, NS 7.01 and IE 6). |
|
#3
|
||||
|
||||
|
Note that there is a big difference between 'hidden' and 'none'.
http://www.mikepick.com/news/archives/000119.html |
|
#4
|
|||
|
|||
|
Thanks a lot for your help, i tried but nothing happens. IE support with no problem my code but not Setscape 7.
I think that he dont like my frames... So i will create a simplify version for Netscape thanks again |
![]() |
| Viewing: Dev Articles Community Forums > Programming > JavaScript Development > problem with getElementByld ans frames |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|