parentnode is null or not an object and the TelerikModalOverlay

4 posts, 0 answers
  1. Bob Roth
    Bob Roth avatar
    3 posts
    Member since:
    Jan 2010

    Posted 26 Jan 2010 Link to this post


    I found an interesting issue that I think may be a bug.  I have a web page that displays a simple edit form with a textbox, a Telerik Modal popup window and a dropdown.  All three have a required field validator.  The problem I found is that when you open the modal popup window and then close it (doesn't matter whether you select an item or not) and then hit the Save button (leaving one or both of the other required fields empty) thus firing the required field validator and causing a validation error (all client-side validation) and then click the Cancel button, you get the following error:

    Line: 122
    Error: 'parentNode' is null or not an object

    It's referring to code in the Telerik.Web.UI.ModalExtender prototype in the "hide" function:

    hide:function(){
     this
     ._restoreTab();
     this
     ._attachWindowHandlers(false);
     var
     _15=this._backgroundElement;
     if
     (_15){
     _15.parentNode.removeChild(_15);
    this
     ._backgroundElement=null;
     }
    }

     

     

    The outerHTML of the object "_15" is as follows:

    "<DIV style="Z-INDEX: 10000; POSITION: absolute; FILTER: progid:DXImageTransform.Microsoft.Alpha(style=0,opacity=50); BACKGROUND-COLOR: #aaaaaa; WIDTH: 1653px; DISPLAY: none; HEIGHT: 915px; TOP: 0px; LEFT: 0px; opacity: .5; mozOpacity: .5" class=TelerikModalOverlay unselectable="on"></DIV>"

    As a side note, if you open the modal popup window, and close it and then click Cancel (without firing the validation event) everything works fine.  However, it also fails (same error) if you leave a field empty, click Save causing a validation error, then fill in the all of the fields and click Save again (validation passes), but you get the same error.

    Oh, and using DestroyOnClose is not an option as they may need to open the popup a second time.  This fixes the problem stated above but does not allow the use to open the popup after they close it.

    Any ideas on the problem here?  Is it a bug in Telerik or am I doing something wrong? 

    Thanks,
    Bob

     

     

  2. Georgi Tunev
    Admin
    Georgi Tunev avatar
    7207 posts

    Posted 29 Jan 2010 Link to this post

    Hi Bob,

    I tried to reproduce the problem locally but to no avail. Could you please open a support ticket and send a small sample where this issue could be reproduced? We will check it right away and do our best to help.


    Sincerely yours,
    Georgi Tunev
    the Telerik team

    Instantly find answers to your questions on the new Telerik Support Portal.
    Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
  3. Donald
    Donald avatar
    1 posts
    Member since:
    Nov 2010

    Posted 10 Nov 2010 Link to this post

    I'm not sure what version the OP was on, but I'm having the same problem with 2009.2.701.20 library .

    Any help you could offer would be greatly appreciated..
  4. Georgi Tunev
    Admin
    Georgi Tunev avatar
    7207 posts

    Posted 15 Nov 2010 Link to this post

    Hi Donald,

    Try updating to a more recent version of the control (the latest official release for Q2 2009 was 2009.2.826) and if you still experience problems, please provide a sample project in a support ticket so we can investigate further.
    What I can say for now is that I recall seeing this error in scenarios based on the Grid Editing demo, where when the user clicked a button in the content page, the following actions were executed:
    1. The RadWindow was closed
    2. A function in the parent page was called (that function updated the RadGrid control via Ajax).
    The problem was that some customers were having DestroyOnClose set to the RadWindow that they were using. What was happening was that p.1 was executed and the window was destroyed and then the browser was trying to execute p.2 from the window that was removed before that.
    If this is your case, just switch p.1 and 2 in the logic, i.e. first call the function in the parent page and then close the window - this should clear the error.

    If this is not your case, please open a support ticket and send a sample project so I can inspect it closely.

    Greetings,
    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