473,549 Members | 2,222 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

implement a default onload handler ?


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.attachEv ent("onload",de faultChores);

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.c om

Dec 8 '05 #1
1 1155
er*******@rcn.c om 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.attachEv ent("onload",de faultChores);

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">
<body onload="default Chores()">
Perhaps this involves some sort of server intervention.

Yes, indeed.
Dec 8 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

by: Da Costa Gomez | last post by:
Hi all, I've been eluded the last couple of *days* on the onload mystery within the frame and function context. Problem is as follows: - frameset with two frames. One called scripts and the other called main - scripts carries a bunch of js functions rechable via parent.scripts.functioName() - Main carries the html page that utilizes some...
by: Robert Oschler | last post by:
I have an frame in one of my documents (not a frameset document). The top level document has an "onload" handler in the BODY tag. I have found that if the frame is unable to navigate to the document it desires, the top level document "onload" handler does not fire, and therefore important Javascript function I need called is not called. ...
by: TPG | last post by:
I'd like a Javascript function I have written to be invoked whenever *any* new document is been loaded into a particular frame (i.e I don't control the incoming document's BODY tag). Under MSIE5.5, I've found that the ONLOAD handler attribute of the corresponding frame element is invoked *every* time a new document is loaded into that frame....
by: Brian | last post by:
Hi everyone, I'm writing a function (in javascript) that needs to do one thing if the page has not loaded, and another (different) thing if the page has already loaded. I'm looking for a way to tell if the window.onload event has already fired. I cannot edit the onload event handler itself, and my function can only exist in an external...
by: berg | last post by:
I'm trying to use the onload event to load a series of urls. What I find is that the onload function is only called one time no matter how large the array. Here is the onload function. var next_win = 0; var win = window.open("", "", ""); function nextWin() { if (next_win < urls.length) { win.onload = nextWin;
by: inevercheckthisaddress | last post by:
I can't get Opera to fire an event when an image object's src has loaded. The test code I'm using is this - --------------------------------- window.onload=go function yo() { alert("yo"); }
by: Daz | last post by:
Hello everyone, I would like to open a child window from the parent, and add an onload event listener to the child window which will tell the parent when the document has loaded. As far as I know, this shouldn't be an issue, but I just can't get it to work. The script only needs to work with Firefox/Mozilla, so XP code isn't an issue. I...
by: sklett | last post by:
I've got a strange situation here. I have a databound DataGridView that also has un-bound columns. When the view loads, I want to update the values of the unbound columns. If I attempt to modify the unbound column's cells in the OnLoad() handler the results are very strange. If I add a button to my view and update the unbound cells in the...
by: howardk | last post by:
I'm writing some code that loads a number of images, using the standard mechanism of assigning a src url to a newly constructed Image object, thus invoking the image-load operation. On a successful load, an image.onload handler I've previously assigned will be called. Or should be at any rate. The problem is that I need to know inside the...
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main...
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. ...
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that...
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the...
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes...
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.