我有Ajax请求的堆栈:异步Ajax请求是不是真的异步(jQuery和Zend公司)
$("someTable tr").each(function() {
// send the data.
var scriptURL = "/module/action/data/" + $(this).find(".data").html() + "/";
document.cyonVars.xhrPool[count] = $.ajax({
type: "GET",
url: scriptURL,
queue: "autocomplete",
cancelExisting: true,
dataType: 'json',
success: function(data){
// do something
}
}
});
count++;
})
虽然这些请求正在运行,用户可以按下按钮。这会触发另一个Ajax请求。类似的东西:
var scriptURL = "/module/anotheraction/" +
data) + "/";
$.ajax({
type: "GET",
url: scriptURL,
queue: "autocomplete",
cancelExisting: true,
dataType: 'json',
success: function(data){
// Do another thing
}
});
来自第一个响应异步的动作的请求,我希望。当用户触发第二个请求时,等待其他请求完成。但第二个要求应该提前进行。我已经与session_write_close()一起工作没有改变任何东西。感谢您的帮助。
谢谢。问题是zend会话。它在您调用zend_session :: start()时锁定所有内容 –