getElementById efficiency

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Christopher Benson-Manica

    #1

    getElementById efficiency

    Is there a significant advantage to storing frequently-accessed
    elements in global variables rather than calling getElementById( )
    repeatedly? IOW, is it worth the effort to essentially create a
    document.all array similar to IE's extension and access important
    elements through it?

    --
    Christopher Benson-Manica | I *should* know what I'm talking about - if I
    ataru(at)cybers pace.org | don't, I need to know. Flames welcome.
  • Douglas Crockford

    #2
    Re: getElementById efficiency

    > Is there a significant advantage to storing frequently-accessed[color=blue]
    > elements in global variables rather than calling getElementById( )
    > repeatedly?[/color]

    Yes.
    [color=blue]
    > IOW, is it worth the effort to essentially create a
    > document.all array similar to IE's extension and access important
    > elements through it?[/color]

    No.

    Comment

    Working...