[Javascript] Handle several window.onload functions

Falls, Travis D (HTSC, CASD) Travis.Falls at thehartford.com
Tue Jul 5 15:25:47 CDT 2005


Hi Guillaume,
Great to meet you.  From my experience people on this list answer things
more often when code snippets accompany a question.  I think I know what you
are asking but that would really help to clarify.  Thanks.

Travis D. Falls | Consultant   RAFT.Net   IT | 860.547.4070 |
travis.falls at thehartford.com 

-----Original Message-----
From: javascript-bounces at LaTech.edu [mailto:javascript-bounces at LaTech.edu]On
Behalf Of Guillaume
Sent: Tuesday, July 05, 2005 4:22 PM
To: [JavaScript List]
Subject: [Javascript] Handle several window.onload functions



Hi list,

This is my first post here so let me introduce myself briefly: my name is
Guillaume and i'm working as a freelance webdesigner
in Paris, France.
 I was told elsewhere, the css-d mailing list, by a very nice guy, Roger
Roelofs, who helped me a lot on some JavaScript issues, that this was a
great list to ask for help. I've been using JS since the very begining of my
activity on the web but my skills are limited to change scripts that are
already built, not to build them from the scratch. 
So here i go:  I focused a lot this last year on Css and Accessibility. I
recently discovered the concept of "Unobtrusive Javascript" and try now to
separate completely the JS i use from the document content. The problem i
encounter is that i use several window.onload for the same document, wich
cancel each other called separately. I'd like to build a global
window.onload function, in wich i could add a list of different functions I
fire up with window.onload. 
I actually thought this would be easy... Apparently not when i read Simon
Willison's weblog about this subject in an article called "Executing
<http://simon.incutio.com/archive/2004/05/26/addLoadEvent> JavaScript on
page load"
I'm unable, don't have the skills, to choose carefully for a valid method
when i read this article and the multiple comments related.
So can this problem be solved by a simple way, cross-browser, robust method
?
Could someone point me to a simple ressource, or help me on this problem ?
Thanks.
Guillaume




*************************************************************************
PRIVILEGED AND CONFIDENTIAL: This communication, including attachments, is
for the exclusive use of addressee and may contain proprietary,
confidential and/or privileged information.  If you are not the intended
recipient, any use, copying, disclosure, dissemination or distribution is
strictly prohibited.  If you are not the intended recipient, please notify
the sender immediately by return e-mail, delete this communication and
destroy all copies.
*************************************************************************

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.evolt.org/pipermail/javascript/attachments/20050705/ca1f7858/attachment.htm>


More information about the Javascript mailing list