[thelist] Problems with late arrivals of JS SRCs

.jeff jeff at members.evolt.org
Wed Jan 9 15:37:32 CST 2002


simon,

><><><><><><><><><><><><><><><><><><><><><><><><><><><><><
> From: Simon Dell
>
> for a really ugly cheap hack, you could put the first
> function call in a <script/> tag at the bottom of the
> page, so that it's the last thing loaded.
>
> i'm pretty sure that this isn't _supposed_ to be any
> different from using <body onload="foo(()"/> but it
> saved my bacon on one project i did even though i didn't
> want to use it.
><><><><><><><><><><><><><><><><><><><><><><><><><><><><><

placing a function call at the end of the html is quite different than
placing the function call in the onload event handler of the <body> tag.
the function call at the end of the html will fire as soon as the browser
reaches that point in the source for parsing, irregardless of whether or not
the page has actually finished loading (external javascript files, external
stylesheets, images, etc.).

.jeff

http://evolt.org/
jeff at members.evolt.org
http://members.evolt.org/jeff/






More information about the thelist mailing list