ExtJS的:两个平行的Ajax调用两个、ExtJS、Ajax

由网友(路太多)分享简介:我的code创建的两个同时ajax调用(我假设的并行效率会比较高)。我想加载一个表,如果两次调用都成功。什么是这样做的正确方法?解决方案 VAR成功= {};功能callBackOne(){succeeded.one = TRUE;//你的其他的东西如果(succeeded.two){bothHaveSuccee...

我的code创建的两个同时ajax调用(我假设的并行效率会比较高)。我想加载一个表,如果两次调用都成功。什么是这样做的正确方法?

解决方案

  VAR成功= {};

功能callBackOne(){
     succeeded.one = TRUE;
     //你的其他的东西
     如果(succeeded.two){bothHaveSucceeded());
}


功能callBackTwo(){
     succeeded.two = TRUE;
     //你的其他的东西
     如果(succeeded.one){bothHaveSucceeded());
}
 

my code creates two ajax call at the same time (i assume the parallelism would be more efficient). I want to load a table if both calls succeed. What's the proper way of doing this?

解决方案 extjs 机构管理 ajax请求失败

var succeeded = {};

function callBackOne(){
     succeeded.one = true;
     // your other stuff
     if (succeeded.two) { bothHaveSucceeded());
}


function callBackTwo(){
     succeeded.two = true;
     // your other stuff
     if (succeeded.one) { bothHaveSucceeded());
}

阅读全文

相关推荐

最新文章