在将RDLC报表查看器加载到iframe之前,我已经创建了微调器加载。但是当停止加载gif时,尚未准备好在报告RDLC上加载数据。所以我希望你能帮助我解决这个问题。这是我的代码:
@Html.ReportViewer(ViewBag.ReportViewer as Microsoft.Reporting.WebForms.ReportViewer, new { scrolling = "no", frameborder = "0", id = "form" })
<div id="wait" style="display:none; position:fixed; left:50%; right:50%;"><img src='~/Content/idc_loading1.gif' width="120" height="120" /></div>
<script>
$("#wait").css("display", "block");
document.getElementById("form").contentWindow.document.body.onload = function () {
$("#wait").css("color", "transparent");
$("#wait").css("display", "none");
};
document.getElementById("form").contentWindow.document.body.addEventListener('DOMSubtreeModified', function () {
$("#wait").css("display", "block");
}, false);
</script>