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

2 posts, 0 answers
  1. Srikanth
    Srikanth avatar
    10 posts
    Member since:
    Jul 2010

    Posted 30 Sep 2010 Link to this post

    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.
  2. Georgi Tunev
    Admin
    Georgi Tunev avatar
    7207 posts

    Posted 01 Oct 2010 Link to this post

    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
Back to Top