poi
09-19-2000, 10:18 AM
people'hi
i have a problem in js+dhtml with ns 4.0 (and 4.5)
in an html, with a void BODY, i've linked 2 .JS in the HEAD, the 1st one his my class engine and the 2nd is the class instanciation.
once the class is instanciated i build and write some HTML code (which is free of any bugs) in a frame to handle a TREE MENU with layers
but, when I try to change the layer's properties Netscape 4.04 and 4.5 seems to "lose" the layers.
My engine works fine with NS 4.72, and IE 5.0
to be sure of what happens i did some ALERTs in the function that change layers properties to see if the SOURCE of the layers is the good one and if the BROWER find the layers
:: here they are ::
src = FunctionName.aguments[0]
//src=window
alert('src > '+ src +' <\nsrc.document > '+ src.document +' <\n src.document.'+ ((NS)?'layers':'all') +' > '+ ((NS)?src.document.layers:src.document.all) +' <')
n=(NS)?src.document.layers.length:src.document.all.length
bla='__LAYERS NAMES__\n'+ n +' layers\n\n'
for(j=0;j< n;j++)
bla+='. '+((NS)?src.document.layers[j].name:src.document.all[j].id)
alert(bla)
:: what happens under NS 4.72 & IE 5.0 ::
___1st alert
src > [object Window] <
src.document > <
src.document.layers > [object.LayerArray]
___2nd alert
LAYERS NAMES
18 layers
.Menu1_0_item_over....... (...)
:: what happens under NS 4.04 & NS 4.5 ::
___1st alert
src > [object Window] <
src.document > <
src.document.layers > [object.LayerArray]
___2nd alert
LAYERS NAMES
0 layers
So does any one have any idea on how to acces the layers with ns4.04 and ns4.5 ?
mathieu 'poi' henri
i have a problem in js+dhtml with ns 4.0 (and 4.5)
in an html, with a void BODY, i've linked 2 .JS in the HEAD, the 1st one his my class engine and the 2nd is the class instanciation.
once the class is instanciated i build and write some HTML code (which is free of any bugs) in a frame to handle a TREE MENU with layers
but, when I try to change the layer's properties Netscape 4.04 and 4.5 seems to "lose" the layers.
My engine works fine with NS 4.72, and IE 5.0
to be sure of what happens i did some ALERTs in the function that change layers properties to see if the SOURCE of the layers is the good one and if the BROWER find the layers
:: here they are ::
src = FunctionName.aguments[0]
//src=window
alert('src > '+ src +' <\nsrc.document > '+ src.document +' <\n src.document.'+ ((NS)?'layers':'all') +' > '+ ((NS)?src.document.layers:src.document.all) +' <')
n=(NS)?src.document.layers.length:src.document.all.length
bla='__LAYERS NAMES__\n'+ n +' layers\n\n'
for(j=0;j< n;j++)
bla+='. '+((NS)?src.document.layers[j].name:src.document.all[j].id)
alert(bla)
:: what happens under NS 4.72 & IE 5.0 ::
___1st alert
src > [object Window] <
src.document > <
src.document.layers > [object.LayerArray]
___2nd alert
LAYERS NAMES
18 layers
.Menu1_0_item_over....... (...)
:: what happens under NS 4.04 & NS 4.5 ::
___1st alert
src > [object Window] <
src.document > <
src.document.layers > [object.LayerArray]
___2nd alert
LAYERS NAMES
0 layers
So does any one have any idea on how to acces the layers with ns4.04 and ns4.5 ?
mathieu 'poi' henri