This is a migrated thread and some comments may be shown as answers.

"Microsoft JScript runtime error: Sys.InvalidOperationException: Handler was not added through the Sys.UI.DomEvent.addHandler method"

1 Answer 101 Views
Window
This is a migrated thread and some comments may be shown as answers.
Srikanth
Top achievements
Rank 1
Srikanth asked on 30 Sep 2010, 07:19 AM
Hi,

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.

1 Answer, 1 is accepted

Sort by
0
Georgi Tunev
Telerik team
answered on 01 Oct 2010, 12:20 PM
Hi Srikanth,

I have already answered you in the other forum thread on the same subject.


Best wishes,
Georgi Tunev
the Telerik team
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
Tags
Window
Asked by
Srikanth
Top achievements
Rank 1
Answers by
Georgi Tunev
Telerik team
Share this question
or