C# ASP.NET JavaScript弹出窗口获取属性失败
在我的ASP.NET应用程序中,我的弹出窗口为特定变量返回null。 当我单击按钮时,会触发此JavaScript: OpenPageWithParam看起来像: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
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。这是否意味着您试图在上一页设置弹出变量,然后在下一页调用它?不,我将参数从一个页面发送到弹出页面,这是不可能的吗?