[thelist] js hide layer function
Jeff
jeff at lists.evolt.org
Tue Oct 3 13:32:51 CDT 2000
bob,
:~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
: From: Bob Davis <bobd at lists.evolt.org>
:
: function HideAll () {
: var l = document.all.layers.length
: for ( var i=0;i < (l -1); i++) {
:
: document.layers[i].style.visibility='hide';
: }
: }
:
: I'm getting a 'document.all.layers.length is not an
: object' error in Mac IE5, (same if I remove the 'all')
: though I know it works in other scripts.
:~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
the problem is that there are no such thing as a layers object in ie. so,
it's looking for an element in the all collection named "layers", but not
finding one - hence your "not an object" error. remove the layers reference
and see if that changes anything.
good luck,
.jeff
name://jeff.howden
game://web.development
http://www.evolt.org/
mailto:jeff at members.evolt.org
More information about the thelist
mailing list