|
|
|||||||||
|
|||||||||
| |||||||||
|
|
|
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
#1
|
|||
|
|||
|
I'm currently freeked out by this can someone please show me an example where NS actually works?
This works in IE: <HTML> <SCRIPT TYPE="javascript"> function test() { document.all.Barr.style.visibility = "hidden"; } </SCRIPT> <BODY > <FORM> <INPUT type=checkbox name=r1 onclick=test()>Radio1<br> <DIV ID="Barr" Style="visibility:visible"> <INPUT type=radio name=r2 >Radio2<br> <INPUT type=radio name=r3 >Radio3<br> <INPUT type="text" name=r2><br> </DIV> </FORM> </BODY> </HTML> I know I need to change this line: document.all.Barr.style.visibility = "hidden"; but to what? ------------------ Barry |
|
#2
|
|||
|
|||
|
Try this:
function test(){ //--document.layers detects NS if (document.layers){ document.Barr.visibility='hide'; } //--document.all detects IE else if (document.all){ Barr.style.visibility='hidden'; } } Spookster |
|
#3
|
|||
|
|||
|
i agree with spookster, but you need to take the style attribute off of the div
not <DIV id="Barr" STYLE... but <DIV Id="Barr"> |
|
#4
|
|||
|
|||
|
In the STYLE properties, you have to set the attribute POSITION as ABSOLUTE. If you don't do that, your DIV element won't be considered as a LAYER in NS.
<DIV STYLE="position:absolute; .." .. KliK |
![]() |
| Viewing: Dev Shed Forums > Web Design > HTML Programming > DIV with IE + NS (visibility) |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|