Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/csharp/262.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
C# ASP.NET JavaScript弹出窗口获取属性失败_C#_Javascript_Asp.net - Fatal编程技术网

C# ASP.NET JavaScript弹出窗口获取属性失败

C# ASP.NET JavaScript弹出窗口获取属性失败,c#,javascript,asp.net,C#,Javascript,Asp.net,在我的ASP.NET应用程序中,我的弹出窗口为特定变量返回null。 当我单击按钮时,会触发此JavaScript: OpenPageWithParam看起来像: function returnOrderPicker() { alert("Test fra returnOrderPicker"); } function OpenPageWithParam(PageName, Query, ReturnFunction) { var _window = null; In

在我的ASP.NET应用程序中,我的弹出窗口为特定变量返回null。 当我单击按钮时,会触发此JavaScript:

OpenPageWithParam看起来像:

function returnOrderPicker() {
    alert("Test fra returnOrderPicker");
}
function OpenPageWithParam(PageName, Query, ReturnFunction) {
    var _window = null;

    InitBlocker();

    switch (PageName) {

        case "OrderPermanentItems":
            _window = PopupCenter(ROOT_DIR + "/Forms/Pickers/PermanentItemsPicker.aspx" + Query, PageName, 590, 600);
            break;
    }

    _window.ReturnFunction = ReturnFunction;

    return _window;
}
<script type="text/javascript" language="javascript">
    window.onload = function (sender, eventArgs) { alert(window.ReturnFunction + " Window PermanentItemPickerPopup "); }
</script>
我将弹出窗口的属性ReturnFunction设置为上一页数据的ReturnFunction。在本例中,返回OrderPicker函数

但是,当窗口弹出时,window.ReturnValue的值未定义

在弹出窗口中调用如下所示:

function returnOrderPicker() {
    alert("Test fra returnOrderPicker");
}
function OpenPageWithParam(PageName, Query, ReturnFunction) {
    var _window = null;

    InitBlocker();

    switch (PageName) {

        case "OrderPermanentItems":
            _window = PopupCenter(ROOT_DIR + "/Forms/Pickers/PermanentItemsPicker.aspx" + Query, PageName, 590, 600);
            break;
    }

    _window.ReturnFunction = ReturnFunction;

    return _window;
}
<script type="text/javascript" language="javascript">
    window.onload = function (sender, eventArgs) { alert(window.ReturnFunction + " Window PermanentItemPickerPopup "); }
</script>

有什么想法吗

window.ReturnValue在哪里?如果我alertpopup.js=+\u window.ReturnValue函数;在openpagewithparam中,它返回正确的值我正在将弹出窗口的属性ReturnFunction设置为上一页数据的ReturnFunction。这是否意味着您试图在上一页设置弹出变量,然后在下一页调用它?不,我将参数从一个页面发送到弹出页面,这是不可能的吗?