I opened Radwindow from Parent Window.
Radwindow opening fine. After close Radwindow, i have to call javascript function in parent window. for that i used below code:
codebehind in Radwindow :
--------------------------------
public void btnAddtoCaseSheet_Click()
{
Response.Write("<script language='javascript'>GetRadWindow().BrowserWindow.RefreshCaseHistory();</script>");
or
ClientScript.RegisterStartupScript(Page.GetType(), "mykey", "refreshParent();", true);
}
Javascript in Radwindow:
-------------------------------
<asp:Button ID="btnAddtoCaseSheet" runat="server" Text="Add to CaseSheet"
OnClientClick="Close()" onclick="btnAddtoCaseSheet_Click"/>
<script language ="javascript" type ="text/javascript" >
function GetRadWindow() {
var oWindow = null;
if (window.radWindow)
oWindow = window.RadWindow; //Will work in Moz in all cases, including clasic dialog
else if (window.frameElement.radWindow)
oWindow = window.frameElement.radWindow; //IE (and Moz as well)
return oWindow;
}
function refreshParent() {
// caseHistory() function is ParentWindow Javascript function
GetRadWindow().BrowserWindow.CaseHistory();
}
function Close() {
GetRadWindow().Close();
}
</script>
but i am getting below error.
"Microsoft JScript runtime error: Sys.InvalidOperationException: Handler was not added through the Sys.UI.DomEvent.addHandler method"
i am searching to resolve this error for the last 3 weeks. but, i didn't get... pls give reply ASAP.
Thanks and Regards,
Srikanth.