It doesn't look random. Its consistently in reverse order even if you
add more callbacks and repeat any number of time. Looks like there is
an IE branch in onload  trigger code and it is looping the callbacks
in reverse. I can always do what you are saying but the api supports
multiple callbacks and behaves inconsistently across browsers. Just
want to report it since i spend some time scratching my head. If you
find weird synchronization problem on IE and you pass multiple
callbacks to google.setOnLoadCallback() watch out for this one.

-Victor Doss
http://tweetaboogle.com/

On Aug 26, 7:10 pm, Jeremy Geerdes <[email protected]> wrote:
> Technically, I believe that IE fires multiple handlers for the same event in 
> arbitrary order. So you can't guarantee that it will fire in any given order 
> at all. The question is, why don't you attach all of the different functions 
> which depend on each other to a single listener which then processes the 
> listeners in an orderly fashion?
>
> Jeremy R. Geerdes
> Effective website design & development
> Des Moines, IA
>
> For more information or a project quote:http://jgeerdes.home.mchsi.com
> [email protected]
>
> If you're in the Des Moines, IA, area, check out Debra Heights Wesleyan 
> Church!
>
> On Aug 26, 2010, at 7:20 PM, victordoss wrote:
>
> > I noticed registering multiple callbacks using
> > google.setOnLoadCallback() behaves differently on IE (7,8) . The
> > sequence of calling is reversed.
>
> > Here is a simple code:
> > <html>
> >  <head>
> >    <script src="http://www.google.com/jsapi?key=ABCDEFG";
> >        type="text/javascript"></script>
> >    <script type="text/javascript">
> >      google.load("jquery", "1.4.2");
>
> >      google.setOnLoadCallback(function() {
> >         $("#log").append('<span>First callback</span><br>');
> >      });
>
> >      google.setOnLoadCallback(function() {
> >         $("#log").append('<span>Second callback</span><br>');
> >      });
>
> >      google.setOnLoadCallback(function() {
> >         $("#log").append('<span>Third callback</span><br>');
> >      });
> >    </script>
> >  </head>
> >  <body>
> >    <div id="log"></div>
> >  </body>
>
> > </html>
>
> > Output on Firefox:
> > First callback
> > Second callback
> > Third callback
>
> > Output on IE:
> > Third callback
> > Second callback
> > First callback
>
> > Anyone know why ?
>
> > Regards
> > Victor Doss
> >http://tweetaboogle.com/
>
> > --
> > You received this message because you are subscribed to the Google Groups 
> > "Google AJAX APIs" 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 
> > athttp://groups.google.com/group/google-ajax-search-api?hl=en.

-- 
You received this message because you are subscribed to the Google Groups 
"Google AJAX APIs" 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/google-ajax-search-api?hl=en.

Reply via email to