You could use a queue of requests, such that 6 won't be sent until 5 has returned. It puts a bit of a bottleneck on the XHRs but will maintain a stable sequence. I've written an article on how to approach something like this, review at your leisure, http://positionabsolute.net/blog/2007/04/ajax-request-queue.php
On Sep 10, 7:59 am, doug <[EMAIL PROTECTED]> wrote: > I am making a web page with autocomplete on search terms. Of course > the responses do not come back in the order sent. How can I solve > this problem? This is how I was thinking of doing it: > > Somehow mark all of the request objects with the order the request was > sent out. If a request comes back out of order, for example 6 comes > back then 5, I can throw 5 away. > > However, I can not figure out a way to either > 1. Mark the request object with a number, and retrieve that number in > the callback. > 2. In some other way allow the callback to be sent the number > representing the order. > > Can some one help? Is there a better way? > > thanks, > -d --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
