document layers question

C

Chris Leonard

Hi.

Can anyone help me please. If the syntax for IE is:

document.getElementById(layerID)

What if I want to use layers ?

document.layers ?????????

Can someone help me out please.

Thanks

Chris
 
L

Lasse Reichstein Nielsen

Chris Leonard said:
Can anyone help me please. If the syntax for IE is:

document.getElementById(layerID)

That is not just IE, it is in the W3C DOM Core specification.

It is the way to go, unless you need to support ancient browsers.
What if I want to use layers ?
document.layers ?????????

Then you need to use Netscape 4 or earlier.

These are the only browsers to support the proprietary Netscape tag
<layer>, and the collection "document.layers" [1].

Some people still use the word "layer" about absolutely positioned
div elements. I don't recommend that, since it can be confuzed with
real <layer>-tag layers.


/L
[1] OmniWeb is reported to have a property called document.layers, but
it doesn't work.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,768
Messages
2,569,574
Members
45,050
Latest member
AngelS122

Latest Threads

Top