If you need to garuntee that a variable,function or method exists i would always wait until the dom is ready or in each function that gets called test the function,variable or method exists else timeout untill it does Alex Mcauley http://www.thevacancymarket.com ----- Original Message ----- From: "JoJo" <tokyot...@gmail.com> To: "Prototype & script.aculo.us" <prototype-scriptaculous@googlegroups.com> Sent: Thursday, September 03, 2009 6:31 AM Subject: [Proto-Scripty] execution order in IE
> > In my <head>, I'm loading several JS files. I'm expecting this to > occur: > > 1) script1.js is loaded > 2) script1.js runs - it creates an object > 3) script2.js is loaded > 4) script2.js runs - it creates a different object that depends on > script1's object. > 5) and so on.... > > This works perfectly in Firefox and Safari, but fails about 25% of the > time in IE. I've heard that IE will load JS files in the correct > order, but will not guarantee that they are executed in the same > order. How can I restructure my code or use Prototype to fix my > current code? > > > --~--~---------~--~----~------------~-------~--~----~ 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 prototype-scriptaculous@googlegroups.com To unsubscribe from this group, send email to prototype-scriptaculous+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/prototype-scriptaculous?hl=en -~----------~----~----~----~------~----~------~--~---