By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
460,046 Members | 1,350 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 460,046 IT Pros & Developers. It's quick & easy.

getElementById efficiency

P: n/a
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)cyberspace.org | don't, I need to know. Flames welcome.
Jul 23 '05 #1
Share this Question
Share on Google+
1 Reply


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


No.
Jul 23 '05 #2

This discussion thread is closed

Replies have been disabled for this discussion.