On Thu, 13 May 2004 01:07:22 -0400, DU <dr*******@hotWIPETHISmail.com>
wrote:
Ian Richardson wrote:
When is the earliest I can use document.getElementsByTagName() safely -
must it be after the main HTML document has loaded (so I could trigger
it via body onload), or can I use it earlier than this without
generating a javascript error?
I confirm it's the former. You can not generate/query for a nodelist
regarding the document without first having finished completely loading
that document.
I don't agree with this, and testing shows it's okay, gEBTN works fine
in Opera 7.5 and IE here for me, pretty sure it works elsewhere too.
Obviously only up to the nodes parsed at that point (immediately
before the script) but it works.
Jim.
--
comp.lang.javascript FAQ -
http://jibbering.com/faq/