weixin_33747129 2015-10-02 07:34 采纳率: 0%
浏览 34

jQuery Ajax循环调用

I am using Ajax call in loop for different section and may be some time ajax success function took little more time for processing so for second time when again ajax call happens then error msg comes. can any body tell me how can i handle this ajax call in loop

Below is Example

for(var i=0;i<=3;i++)
    {
      $.ajax({
                    type: "GET",
                    contentType: "application/javascript; charset=utf-8;",
                    dataType: 'jsonp',
                    jsonpCallback: 'callbackfunction',
                    url: valid URL,
                    data: { 'Parameter List' },
                    success: function (data) {
                        // Some Code
                     },
                    error: function (xhr, status, error) {
                        alert('Problem Data.');
                    }
                });
    }
  • 写回答

0条回答 默认 最新

    报告相同问题?