Internet Explorer 7 Ajax not loading

Internet Explorer 7 Ajax not loading

本文关键字:not loading Ajax Explorer Internet      更新时间:2023-09-26

我正在使用ajax加载一个用户列表以显示在表中。由于某些原因,IE7中的列表将不会加载?不太确定问题出在哪里,对我一直觉得很有挑战性的旧版本进行故障排除。

以下是链接:http://blooming-ice-7964.herokuapp.com/

适用于IE7以外的所有应用程序。这是RoR应用程序,因此CSS/JS被最小化。

以下是我在页面初始加载时调用的方法,以获得json结果:

inout.replaceUsers = function() {
  var $body = $('#user-list').find('tbody');
  $.getJSON('/', function(data) {
    $body.empty();
    $body.html($('#user-list-template').render(data));
    inout.refresh();
  });
};

这是主页上调用上述方法的jQuery:

$(function() {
    inout.replaceUsers();
  });

我使用jsRender和一个模板来渲染所有这些。

callback=?添加到查询字符串中。

inout.replaceUsers = function() {
  var $body = $('#user-list').find('tbody');
  $.getJSON('/?callback=?', function(data) {
    $body.empty();
    $body.html($('#user-list-template').render(data));
    inout.refresh();
  });
};