K
Kreisquadratur
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?
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?