document layers question

Discussion in 'Javascript' started by Chris Leonard, Sep 2, 2003.

  1. 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
    Chris Leonard, Sep 2, 2003
    #1
    1. Advertising

  2. "Chris Leonard" <> writes:

    > 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.
    --
    Lasse Reichstein Nielsen -
    Art D'HTML: <URL:http://www.infimum.dk/HTML/randomArtSplit.html>
    'Faith without judgement merely degrades the spirit divine.'
    Lasse Reichstein Nielsen, Sep 2, 2003
    #2
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Terri I.
    Replies:
    0
    Views:
    86
    Terri I.
    Jul 24, 2003
  2. David List

    document.layers & Mozilla

    David List, Sep 6, 2003, in forum: Javascript
    Replies:
    6
    Views:
    117
    Richard Cornford
    Sep 7, 2003
  3. Crimefighter
    Replies:
    3
    Views:
    106
    kaeli
    Apr 12, 2004
  4. document.layers error in IE

    , May 29, 2005, in forum: Javascript
    Replies:
    4
    Views:
    95
    Grant Wagner
    May 31, 2005
  5. yawnmoth

    document.all vs. document.layers

    yawnmoth, Dec 24, 2005, in forum: Javascript
    Replies:
    2
    Views:
    82
    Michael Winter
    Dec 24, 2005
Loading...

Share This Page