AJAX调用阻止页面加载其他元素

时间:2017-02-14 23:44:48

标签: javascript php jquery ajax laravel

2 个答案:

答案 0 :(得分:0)

问题是我的localhost服务器没有足够的容量。当网站在我的专用服务器上运行时,一切正常。

答案 1 :(得分:-1)

根据我的评论,请考虑在newAJAXCall成功函数中进行循环播放

$.ajax({
    async: true,
    url: url,
    data: {
        //data
    },
    success: function (response) {

    //Process response (append html, images, etc.)


        newAJAXCall(response);
    },
    error: function (xhr) {

    }
});


function newAJAXCall(response) {
$.ajax({
    async: true,
    url: url,
    data: {
        //data

    },
    success: function (response) {

        for (var key in response) {
            //Process response[key]
        }

    },
    error: function (xhr) {

    }
});

}

相关问题