次のjavascriptを使用した多くのデータベースクエリのために時間がかかる新しいWebページを開くためにjQuery BlockUIを使用しています:
function productSheet(url2) {
       $.blockUI.defaults.overlayCSS = {};
        $.blockUI({ });
        $.ajax({
            url: url2,
            success: function (respones) {
                var win = window.open();
                with (win.document) {
                    open();
                    write(respones);
                    close();
                }
            }
        });
    };
新しいページで、いくつかの jQuery JavaScript と外部 jQuery スクリプトへの参照を取得しました。ただし、上記のすべての JavaScript の後にページをレンダリングすると、スクリプトで「$ undefined」のエラーがスローされます。ページを更新すると、すべてが機能し始め、スクリプト エラーは発生しません。
この問題は、IE 9 でデバッグしているときにのみ発生します。Firefox ではすべてが機能します (JavaScript エラーはなく、スクリプトは機能します)。
誰が問題が何であるかについて何か考えを持っていますか?
編集:
ページ iam レンダリングは MVC 3 ビューです。したがって、上記のスクリプトは、このビューを返す MVC アクションに移動します。
@model WebApplication.Controllers.ProductSheetModel
<!DOCTYPE html>
<html>
<head>
<title>Sheet - @Model.ArticleMain.ArticleMain.T0018_BENAM</title>
    <script src="../../js/jquery-1.3.2-vsdoc2.js" type="text/javascript"></script>
    <link href="../../css/ProductSheet.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="wrapper">
    @if (Model.IsPDFExport == false)
    { 
        @Html.DisplayFor(model => model.ArticleMain, "ProductSheetHeader")
    }
    ... some more partical views...
</div>
</body>
</html>
<script type="text/javascript">
$(document).ready(function () {
    var tabelheight1 = $("#divNutritiveValues").height();
    var tabelheight2 = $("#divMarking").height();
    if (tabelheight1 > tabelheight2) {
        $("#divMarking").css("height", tabelheight1 + "px");
        $("#divNutritiveValues").css("height", tabelheight1 + "px");
    }
    if (tabelheight2 > tabelheight1) {
        $("#divNutritiveValues").css("height", tabelheight2 + "px");
        $("#divMarking").css("height", tabelheight2 + "px");
    }
    var tableheightStore = $("#divStore").height();
    var tableheightCooking = $("#divCooking").height();
    if (tableheightCooking > tableheightStore) {
        $("#divCooking").css("height", tableheightCooking + "px");
        $("#divStore").css("height", tableheightCooking + "px");
    }
    if (tableheightStore > tableheightCooking) {
        $("#divCooking").css("height", tableheightStore + "px");
        $("#divStore").css("height", tableheightStore + "px");
    }
    var tableInfoProvid = $("#divInformationProvider").height();
    var tableManufac = $("#divManufacturer").height()
    if (tableInfoProvid > tableManufac) {
        $("#divManufacturer").css("height", tableInfoProvid + "px");
        $("#divInformationProvider").css("height", tableInfoProvid + "px");
    }
    if (tableManufac > tableInfoProvid) {
        $("#divInformationProvider").css("height", tableManufac + "px");
        $("#divManufacturer").css("height", tableManufac + "px");
    }
});