开发者

ie not firing ajax complete call on certain page

even with a piece of code like this

$.get('getforums.php', function(data) {
    alert(data);
});

works well in chrome, firefox, safari, opera but not this baby. tried everything, cleared cache, recreate this file in different editor, even make this file just开发者_JAVA技巧 echoed a 's', but no, it just don't like this file, works perfect on other file

thanks for the help!


Most likely an encoding issue. IE is pretty strict about what encodings it will accept. Try switch the $.get out for a $.ajax call and log the error message.

$.ajax({
  url: 'getforums.php',
  dataType: 'text',
  data: {},
  success: function(data) {
    console.log(data);
  },
  error: function(XMLHttpRequest, textStatus, errorThrown) {
    console.log(textStatus, errorThrown);
  }
});
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜