I'm trying to check if a layer exists in a script and NN keeps telling me the layer doesn't when I know it does.
I've got two <layers> in the page and a script that's called in one of the layers has to check that the other named layer is there.
In essence....
The second layer gets dynamically created on the server which is why I need to check for it.
Even in NN debug tool it tells me that the document.layers array exists but the zeroth element is empty.
Any ideas?
(To be honest the page is a little more complex but....)
I've got two <layers> in the page and a script that's called in one of the layers has to check that the other named layer is there.
In essence....
Code:
<layer id="layer1"......>
<script>
if (document.layer2){
doSomeStuff
}
</script>
Other stuff
</layer>
<layer id="layer2"......>
whatever
</layer>
The second layer gets dynamically created on the server which is why I need to check for it.
Even in NN debug tool it tells me that the document.layers array exists but the zeroth element is empty.
Any ideas?
(To be honest the page is a little more complex but....)