【发布时间】:2016-08-05 05:48:38
【问题描述】:
在 aspx page1 我有一个按钮。我单击该按钮,它会打开一个在 aspx page2 中实现的 radwindow。在 radwindow 中,我输入一些数据并单击保存按钮。它调用服务器端方法,然后关闭 radwindow。关闭 radwindow 后,它应该触发 page1 的方法。如何做到这一点?
从 page1 打开 radwindow 的代码:
function btnAddNewImage_click() {
debugger;
var hdn_PatientId = document.getElementById("<%=hdn_PatientId.ClientID %>").value;
var selectedEncounterId = document.getElementById("<%=hdn_EncounterId.ClientID %>").value;
var oWnd = radopen("../Admin/Encounter/PopUps/UploadImages.aspx?EncounterId=" + selectedEncounterId + "&PatientId=" + hdn_PatientId, "rwDialog");
oWnd.SetTitle("Upload Image");
oWnd.SetSize(600, 350);
oWnd.Center();
//oWnd.add_close("refreshGrid");
oWnd.OnClientClose = "refreshGrid"; // Not working
return false;
}
radwindow 关闭后触发的函数:
function refreshGrid(sender, eventArgs) {
debugger;
alert("in refreshgrid");
var selectedEncounterId = document.getElementById("<%=hdn_EncounterId.ClientID %>").value;
loadImagesProgressNotes(selectedEncounterId, "Current");
}
在page2中关闭radwindow的代码
RadScriptManager.RegisterStartupScript(this, this.GetType(), "Alert", "javascript:returnToParent();", true);
function returnToParent() {
debugger;
//get a reference to the current RadWindow
var oWnd = GetRadWindow();
oWnd.close();
}
【问题讨论】:
标签: javascript asp.net telerik