1

Telerik ウィンドウを使用して ajaxRequest を使用してページを開くページがあります。それは美しく働きます。しかし、次にそのボタンを押しても何も起こりません。以下にコード スニペットを示します。window.ajaxRequest(url); window.center(); window.open();

以下のように、クライアント側の完全なスクリプトを試してみました。

    var url = "/workbench/createscenario?opportunityid=" + opportunityid + "&customerid=" + customerid;

    var windowElement = $.telerik.window.create({
        title: "Form",
        html: '',
        contentUrl: url,
        modal: true,
        resizable: true,
        draggable: true,
        onClose: function (e) {
            alert("destroying");
            e.preventDefault();
            windowElement.destroy();

        },
        onRefresh: function (e) {
            windowElement.center();
        }

    }).data('tWindow');

    windowElement.center().open();

どんな助けでも大歓迎です....私は本当に別のポップアップを試したくありません

4

2 に答える 2

0

ウィンドウを閉じたら、内側の HTML を削除する必要があります。このような:

onClose: function () {
                    myClass.myWindow = undefined;
                    if ($("#mainDiv") != undefined)
                        $("#mainDiv").remove();
                } 

「myWindow」は Telerik ウィンドウで、「mainDiv」はウィンドウで作成されたすべての要素を含む div です。

于 2011-06-07T15:30:02.477 に答える
0

onclose イベントのステートメントの順序を変更し、変数を null に設定して、ウィンドウを完全に破棄します

var windowElement = $.telerik.window.create({

    title: "Form",
    html: '',
    contentUrl: url,
    modal: true,
    resizable: true,
    draggable: true,
    onClose: function (e) {
        windowElement.destroy();
        wndSendEmail = null;
        e.preventDefault();**
    },
    onRefresh: function (e) {
        windowElement.center();
    }

}).data('tWindow').center().open();
于 2014-05-13T17:13:13.300 に答える