Hello!
Thinking about events fired when a webpage is loaded, I would expect
these events in exact this order:
domReady
body.onLoad
window.onLoad
Now, all I want to do, is to observe this events unobtrusivly using
prototypejs. (with MooTools this is possible, but I need to use
prototype for my current project)
So far, I have:
document.observe('dom:loaded', function() {
alert('DOM.ready')
Event.observe(window, 'load', function() {
alert('window.onload');
});
});
The inline onLoad event (<body onload="alert('body.onLoad')">) works
well.
But I can't observe the onload event from the body. I am using
prototypejs 1.6.1. How can I listen for that event?
What I've tried so far:
Event.observe($$('body')[0], 'load', function() {
bodyOnLoad();
});
Any ideas welcome.
Regards,
Matthias
--
You received this message because you are subscribed to the Google Groups
"Prototype & script.aculo.us" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/prototype-scriptaculous?hl=en.