1

Closed

Multiple .get() requests returned out of order

description

AJAX race condition found. Test script:
 
$(function(){
var d = $("table.ms-listviewtable[id]");
 d.each(function(i,e){
    var arr = e.id.replace("}-{","}|{").split("|");
    arr.push($(e).attr("summary"));
    owsapi({ctx:arr[2],list:arr[0],view:arr[1]});
 });
});
 
Result: only one ctx will populate with strange results. Investigating AJAXQueue plugin for jQuery to solve problem.
Closed May 24, 2009 at 4:39 AM by AutoSponge
race condition corrected.

comments

AutoSponge wrote May 24, 2009 at 4:38 AM

replaced $.get with $.ajax and used async : false option. Above test script now works and was included with the example DWP download file.

wrote May 24, 2009 at 4:39 AM

wrote Feb 2, 2013 at 3:23 AM

wrote May 14, 2013 at 11:28 PM