![]() | |
![]() |
| | Thread Tools | Display Modes |
#1
| |||
| |||
|
#2
| |||
| |||
|
|
I'm trying to do a show/hide of several elements on a page and can't get it working in Netscape 4.x. All other Windows browsers are working. |
#3
| |||
| |||
|
|
I'm trying to do a show/hide of several elements on a page and can't get it working in Netscape 4.x. All other Windows browsers are working. |
|
For Netscape 4.x I have coded in my javascript: document.myClassName.visibility = "hide"; to hide it and document.myClassName.visibility = "show"; to show it. My CSS for this function is: style type="text/css" ..myClassName {visibility:hidden;} |
|
/style When I use the toggle I get this error: document.myClassName has no properties. |
#4
| |||
| |||
|
|
TravelMan wrote: I'm trying to do a show/hide of several elements on a page and can't get it working in Netscape 4.x. All other Windows browsers are working. Sorry, but I really doubt that the below is working with *any* user agent. For Netscape 4.x I have coded in my javascript: document.myClassName.visibility = "hide"; to hide it and document.myClassName.visibility = "show"; to show it. My CSS for this function is: style type="text/css" ..myClassName {visibility:hidden;} Is the `..' a typo? If not, remove one dot. /style When I use the toggle I get this error: document.myClassName has no properties. You cannot reference CSS classes like objects. Instead, iterate through the collection of DIV elements (use document.getElementsByName, document.getElementsByTagName or document.layers, depending on the DOM[1]) and change the `className' property of each element to the name of a CSS class where the `visibility' property has the value of `show'. F'up2 cljs PointedEars ___________ [1] Possibly you find http://pointedears.de.vu/scripts/dhtml.js useful in this regard. |
#5
| |||
| |||
|
|
Thomas 'PointedEars' Lahn <PointedEars (AT) web (DOT) de> wrote in message news:<3F8C6DC7.5040803 (AT) PointedEars (DOT) de>... |
|
TravelMan wrote: [...] style type="text/css" ..myClassName {visibility:hidden;} Is the `..' a typo? If not, remove one dot. /style When I use the toggle I get this error: document.myClassName has no properties. You cannot reference CSS classes like objects. Instead, iterate through the collection of DIV elements (use document.getElementsByName, document.getElementsByTagName or document.layers, depending on the DOM[1]) ^^^^^^^^^^^^^^^ and change the `className' property of each element to the name of a CSS class where the `visibility' property has the value of `show'. [...] How do you get a handle on the className for a DIV when getElementsByTagName doesn't work in NN4.x? |
|
Is there another way to get the className for a DIV or a layer? |
#6
| |||
| |||
|
#7
| |||
| |||
|
|
Can you recommend any good books on the DOM and DOM scripting? |
|
I'm new to using that and already am impressed by the power of what it offers. |
![]() |
| Thread Tools | |
| Display Modes | |
| |