Chris Dillow
Posts: 0
Joined: Fri Nov 21, 2014 12:39 am

Wait for Service Complete in JS

Executing a service in javascript seems to be async.
If you executing a service in a loop say to upload a number of files whats the best way of waiting for the prior execution before starting a new one?

service_name.execute({
success: function( e ) {
//Success handler here
},
error: function( e ) {
//Error handler here
},
complete: function( e ) {
//Complete handler here
},
});

Serhii Kulibaba
Posts: 150
Joined: Tue Aug 27, 2013 1:47 pm

Wait for Service Complete in JS

Hello Chris,

The best way is run all services in sequence (or the same, but with different parameters).

Return to “Issues”