Talk About Network

Google


Register and Login
Nick
Password
Register create new account Sign up is FREE and you can post replies, new topics, bookmark posts and more!
Recover lost password


Programming > JavaScript > Order Prototype...
Latest [ Topics | Posts ] Archive Post A New Topic Post a Reply
<< Topic < Post Post 1 of 3 Topic 35456 of 36378
Post > Topic >>

Order Prototype's Ajax.Request in a kind of Pipeline

by Kreisquadratur <Uwe.Dauernheim@[EMAIL PROTECTED] > May 2, 2008 at 02:11 AM

I'm in the situation, that a user could take actions which will
trigger several Ajax.Requests. The problem here is, that the browser
should stay responsive, so I need the asynchronous feature but the
responses from the server should not only have the same order as the
requests, but I also have to wait for the first answer before I can
send the second request. So like:

Request 1
Response to 1
Request 2
Response to 2
Request 3
Response to 3

Not:

Request 1
Request 2
Request 3
Response 1
Response 3
Response 2

And not even:

Request 1
Request 2
Request 3
Response 1
Response 2
Response 3

Why? Because the server responding me will lose/"forget" his current
answer, if another request comes in _and_ he can't even handle two
almost parallel requests.

I don't know how to change my code, cause functions like onSuccess
seem to run in a seperate "thread".

Anybody any idea?
 




 3 Posts in Topic:
Order Prototype's Ajax.Request in a kind of Pipeline
Kreisquadratur <Uwe.Da  2008-05-02 02:11:07 
Re: Order Prototype's Ajax.Request in a kind of Pipeline
"Tom de Neef" &  2008-05-02 13:07:33 
Re: Order Prototype's Ajax.Request in a kind of Pipeline
jdalton <John.David.Da  2008-05-02 08:27:06 

Post A Reply:
  Go here to Signup

AddThis Feed Button


About - Advertising - Contact - Frequently Asked Questions - Privacy Policy - Terms of Use - Signup

Contact
tan12V112 Fri Jul 25 17:57:05 CDT 2008.