Starnge order of observing of events dom:loaded in IE8

158 views
Skip to first unread message

buda

unread,
Jun 14, 2011, 5:58:36 PM6/14/11
to Prototype & script.aculo.us
I've registered on a page scripts

<html>
<body>
.....
<body>
<script src="prototype.js" type=\"text/javascript\"><script>
<script src="global.js" type=\"text/javascript\"><script>
<script src="page1.js" type=\"text/javascript\"><script>
</html>

in global.js I've registered an event observer on event dom:loaded
document.observe('dom:loaded', function(){ ... });
which makes global preparations

and in page1.js I also add an observer on the same event - to do page
int

In IE9 order of execution of event observer right - first in global.js
and the second in page1.js
But in IE8 the order wrong - first page1.js and then global.js

Help me please what to do!

buda

unread,
Jun 14, 2011, 6:01:43 PM6/14/11
to Prototype & script.aculo.us
there were typing mistakes
This is shoud be typed like this
<script src="prototype.js" type="text/javascript"><script>
<script src="global.js" type="text/javascript"><script>
<script src="page1.js" type="text/javascript"><script>


May be the order is differen because I add scripts at the bottom of
the body???

buda

unread,
Jun 14, 2011, 6:04:22 PM6/14/11
to Prototype & script.aculo.us
I'm sad - I've added scripts at the header, but without the rezult (

Victor

unread,
Aug 2, 2011, 7:10:24 AM8/2/11
to prototype-s...@googlegroups.com
The order of observers is not guaranteed. IRL, IE6-8 use LIFO, other browsers use FIFO order to call observers.
Reply all
Reply to author
Forward
0 new messages