.next()。find()jquery在ie8中不起作用

时间:2015-01-27 18:23:23

标签: jquery internet-explorer-8

以下在chrome中工作正常。但是,row.next().find('#tblReportGroup');在IE8中爆炸。

有什么建议吗?

function ProcessReportGroups() {
    hdn = $('#hdnSuperMasterID');
    $.ajax({
        type: "POST",
        contentType: "application/json",
        url: "Multipass.aspx/GetReportGroups",
        data: '{"id":"' + hdn.val() + '"}',
        success: function (data) {
            tblReportGroup = row.next().find('#tblReportGroup');
            var d = data.d;
            tblReportGroup.append('<tr><th style="width:15px"></th><th>Report Group</th><th>Multipass Total</th><th>MTD</th></tr>');
            for (var i = 0; i < data.d.length; i++) {
                tblReportGroup.append('<tr><td><img src="Resources/ProjectImages/expandDown.png" class="expand" id="imgReportGroup" alt=""><input type="hidden" value="' + data.d[i].ReportNameMasterID + '" id="hdnReportMasterID"> </input></td><td>' + data.d[i].ReportGroupName + '</td><td style="text-align:right">' + data.d[i].R_MultipassTotal_S + '</td><td style="text-align:right">' + data.d[i].MTD_S + '</td></tr>');
                tblReportGroup.append('<tr><td></td><td colspan="5"><table id="tblLOBGroup" cellpadding="10"></table></td></tr>');
            }
        },
        error: function (XMLHttpRequest, textStatus, errorThrown) {
            debugger;
        }
    });
}

var tbl = $('#tblSuperGroups');
var hasComHdr = 0;
var hasConHdr = 0;
var d = data.d;

for (var i = 0; i < data.d.length; i++) {
    tbl.append('<tr><td></td><td><img src="Resources/ProjectImages/expandDown.png" class="expand" alt="SuperGroup" id="imgSuperGroup" ><input type="hidden" id="hdnSuperMasterID" value="' + data.d[i].SuperGroupMasterID + '"></input></td><td>' + data.d[i].SuperGroupName + '</td><td></td></tr>');
    tbl.append('<tr><td></td><td colspan="5"><table id="tblReportGroup" style="width:400px" cellpadding="10"></table></td></tr>');
}

0 个答案:

没有答案