¡@

Home 

2014/10/16 ¤W¤È 12:07:39

jquery Programming Glossary: saverecords

Best way to add a 'callback' after a series of asynchronous XHR calls

http://stackoverflow.com/questions/2208710/best-way-to-add-a-callback-after-a-series-of-asynchronous-xhr-calls

.attr id 'value ' this .data value var counter 0 function saveRecords .ajax url recs counter success function o Update progress if.. function o Update progress if counter recs.length counter saveRecords else doneSavingRecords error function o Update progress doneSavingRecords.. text code to do after saving... if recs.length 0 saveRecords will recursively callback itself until a failed request or until..

Best way to add a 'callback' after a series of asynchronous XHR calls

http://stackoverflow.com/questions/2208710/best-way-to-add-a-callback-after-a-series-of-asynchronous-xhr-calls

search .each function recs recs.length 'save.x3 id ' this .attr id 'value ' this .data value var counter 0 function saveRecords .ajax url recs counter success function o Update progress if counter recs.length counter saveRecords else doneSavingRecords.. 0 function saveRecords .ajax url recs counter success function o Update progress if counter recs.length counter saveRecords else doneSavingRecords error function o Update progress doneSavingRecords o.status function doneSavingRecords text code.. progress doneSavingRecords o.status function doneSavingRecords text code to do after saving... if recs.length 0 saveRecords will recursively callback itself until a failed request or until all records were saved else doneSavingRecords So I'm looking..