It would polute the variable and seriously eat RAM to save every result response in an array, i would highly recommend staying away from it..
Alex Mcauley http://www.thevacancymarket.com ----- Original Message ----- From: "david" <[email protected]> To: "Prototype & script.aculo.us" <[email protected]> Sent: Monday, November 23, 2009 8:00 PM Subject: [Proto-Scripty] Re: Sychronize many asynchronous Ajax.Request > Hi all, > > if you need to save all returned value, just save each request result > in an array. > Check the length of the result list to know when all request are > finished. > > But we still turn around the same idea. > -- > david > > On 23 nov, 15:59, "Alex McAuley" <[email protected]> > wrote: >> The main problem is that due to the "ansynchronous" and the wait times / >> serverside processing times ... you never know which will finish first nd >> if >> the last request relies on the first one completing then its going to >> hard >> fail !!... >> >> Each one needs to set a variable to say its complete ! >> >> Alex Mcauleyhttp://www.thevacancymarket.com >> >> ----- Original Message ----- >> From: "Eric" <[email protected]> >> To: "Prototype & script.aculo.us" >> <[email protected]> >> Sent: Monday, November 23, 2009 2:30 PM >> Subject: [Proto-Scripty] Re: Sychronize many asynchronous Ajax.Request >> >> Hi, >> >> I'd launch all Ajax.Request except the last one with a onSuccess >> handler that: >> - set a flag >> - if all flags are set, launch the last Ajax.Request >> >> This way, you don't have to use timer, or loop calling yourself >> recursively. >> >> Eric >> >> NB: I didn't test it, but you may increment a counter instead of using >> many flags >> >> On 21 nov, 23:31, "T.J. Crowder" <[email protected]> wrote: >> > Hi, >> >> > > Synchronous is simple way but object create time increses x3. How >> > > function use to wait until all object is ready ? setInterval ? >> >> > Probably setTimeout, but yeah; or setTimeout's Prototype wrappers >> > Function#defer / Function#delay. Have the code in question check its >> > preconditions, and if they're not met, setTimeout/defer/delay itself. >> > -- >> > T.J. Crowder >> > Independent Software Consultant >> > tj / crowder software / comwww.crowdersoftware.com >> >> > On Nov 21, 2:33 pm, maalek <[email protected]> wrote: >> >> > > Synchronous is simple way but object create time increses x3. How >> > > function use to wait until all object is ready ? setInterval ? >> >> > > maaalek >> >> > > On 21 Lis, 14:32, "Alex McAuley" <[email protected]> >> > > wrote: >> >> > > > Ask it to check a variable that is set as ready by all the others >> > > > .. >> > > > or make >> > > > it defer and be synchronous .. >> >> > > > Alex Mcauleyhttp://www.thevacancymarket.com >> >> > > > ----- Original Message ----- >> > > > From: "maalek" <[email protected]> >> > > > To: "Prototype & script.aculo.us" >> > > > <[email protected]> >> > > > Sent: Saturday, November 21, 2009 12:59 PM >> > > > Subject: [Proto-Scripty] Sychronize many asynchronous Ajax.Request >> >> > > > > Hello >> >> > > > > I have problem. When my page is load I build many objects (aprox >> > > > > 15) >> > > > > by Ajax.Request (asynchronous : true) but last object I can >> > > > > create >> > > > > when all previous object is ready. Any idea how do that ? >> >> > > > > maaalek >> >> > > > > -- >> >> > > > > 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=. >> >> -- >> >> 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 >> athttp://groups.google.com/group/prototype-scriptaculous?hl=. > > -- > > 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=. > > > -- 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=.
