Hi, Also consider that accessing the element directly also leads to less-maintainable code, as a change in the DOM (presentation) might requre you to change the javascript code ( behaviour ). In my humble opinion, you should use getElementById as the loss of performance is greatly compensated by maintainable code.
PD: This is my first message to the list so please excuse any etiquette or language mistakes i could have made. On 10/5/07, Christian Snodgrass <[EMAIL PROTECTED]> wrote: > > As others have said before, direct access will be always be faster than > the getElementById(), assuming that you are actually getting direct > access (which I'm not 100% sure about). However, I would say the > difference in the speed for most pages would be almost unnoticeable, > probably only a couple of milliseconds difference. The difference would > likely only become apparent if you had either 1000s (or maybe more) > elements and/or 100s of getElementById() calls. > > Christian Snodgrass > Azure Ronin Web Design > > > ******************************************************************* > List Guidelines: http://webstandardsgroup.org/mail/guidelines.cfm > Unsubscribe: http://webstandardsgroup.org/join/unsubscribe.cfm > Help: [EMAIL PROTECTED] > ******************************************************************* > > ******************************************************************* List Guidelines: http://webstandardsgroup.org/mail/guidelines.cfm Unsubscribe: http://webstandardsgroup.org/join/unsubscribe.cfm Help: [EMAIL PROTECTED] *******************************************************************
