IE not triggering jQuery Ajax success

后端 未结 13 1097
心在旅途
心在旅途 2020-12-06 10:50

I\'m working on a script to load some images async using jQuery.

Here is a code snippet of the function that loads the images -

try{
    for(img in i         


        
相关标签:
13条回答
  • 2020-12-06 11:25

    I had a similar problem -- IE appears to trigger failure if it can't parse the response as xml, even if the request was a success, so if you're requesting an image, for example, it would return a xhr.status of 200 in the error block.

    I stuck my "success" functionality in the success block for FF and in the error block wrapped in an "if (xhr.status == 200)" conditional.

    0 讨论(0)
提交回复
热议问题