I'm using jQuery to handle that problem. It provides a DOM ready event that
is executed as soon as the DOM is ready to be selected and manipulated.
Since 1.0 (released 08.2006) that works perfect in IE5.5+, FF1.5+, Opera and
Safari. And from what I heard in Konquerer, too.

So with that there is no need for placing the scripts at the end of the body
or even using the body onload event, which only executed after all images
are loaded, which is way too late.

On 3/8/07, Simon Kitching <[EMAIL PROTECTED]> wrote:

Jonathan Harley wrote:
> Simon Kitching wrote:
>> Simon Kitching wrote:>
>>> For external script the problem is that it is only valid for these
>>> script references to be in the HEAD section.
>>
>> Sorry, this is not true. However it is much more useful for such tags
>> to  be in the head section anyway..
>
> Why useful?
>
> I read some research a while back that said that the popular
> browsers pause from rendering while external scripts are loaded -
> so the page gets rendered fastest if external script references
> are all at the end of the body section. So that's where I put mine.

Because the components are rendered and available for the user to access
before the scripts are loaded.

If a button has an onclick that references a function defined in an
external javascript file, then the user will get a javascript error if
they click on the button while the page is still loading.

Reply via email to