Well, you could attach a time stamp, that'd be a unique identifier with a significance to the order in which it was sent, not really sure of your use case though.
On Sep 10, 7:02 pm, "Diogo Neves" <[EMAIL PROTECTED]> wrote: > On Wed, Sep 10, 2008 at 5:09 PM, doug <[EMAIL PROTECTED]> wrote: > > > On Sep 10, 11:00 am, Matt Foster <[EMAIL PROTECTED]> wrote: > > > 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 > > > I will consider this, however, I would prefer somehow marking the > > requests so I can tell them apart when they are completed. > > You can add something like "search: keyword" to your json object or xml, and > when ur in your function u parse and use this property to see what is your > last. > > Or, possible u can cancel the request you was doing before, but this can be > a overkill if your users hit backspace :) > > > > > The reason for that is when doing search completion, I will be sending > > requests while the user is typing. Queuing them could slow down when > > the user gets the final request (the most relevant one) back from the > > server. > > > Thanks. > > -- > Thanks, > > Diogo Neves > Web Developer @ SAPO.pt by PrimeIT.pt --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
