469,343 Members | 5,388 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,343 developers. It's quick & easy.

implement a default onload handler ?


Hi,

Our project has thousands of web pages.

We have certain default chores we would like to occur as part of the
onload handling for all of these pages.

Rather than modify every page to say

window.attachEvent("onload",defaultChores);

is there some neat way to perhaps tap into the page-loading process so
that the above attachEvent call gets performed implicitly ?

Perhaps this involves some sort of server intervention. That is a
possibility for us, as we have access to the server as well (it's
typically a tomcat server), although admittedly if this is the only way
to do this, then this discussion should quickly migrate out of the
javascript newsgroup and into some sort of web server one.

Any ideas greatly appreciated. Thanks. er*******@rcn.com

Dec 8 '05 #1
1 1089
er*******@rcn.com wrote:
Our project has thousands of web pages.

We have certain default chores we would like to occur as part of the
onload handling for all of these pages.

Rather than modify every page to say

window.attachEvent("onload",defaultChores);

is there some neat way to perhaps tap into the page-loading process so
that the above attachEvent call gets performed implicitly ?
<meta http-equiv="Content-Script-Type" content="text/javascript">
</head>
<body onload="defaultChores()">
Perhaps this involves some sort of server intervention.


Yes, indeed.
PointedEars
Dec 8 '05 #2

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

3 posts views Thread by Da Costa Gomez | last post: by
1 post views Thread by Robert Oschler | last post: by
10 posts views Thread by berg | last post: by
2 posts views Thread by inevercheckthisaddress | last post: by
1 post views Thread by CARIGAR | last post: by
reply views Thread by zhoujie | last post: by
1 post views Thread by Marylou17 | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.