2 Replies Latest reply on Aug 1, 2007 6:48 AM by Filip Hrbek

    JavaScript error: this.parent has no properties

    Filip Hrbek Newbie

      From time to time, opening a modal dialog fails on this JavaScript error:

      this.parent has no properties

      in

      http://[basepath]/a4j.res/org/richfaces/renderkit/html/scripts/modalPanel.js
      Line: 30

      Line content:
      ...
      if(this.lastOutside){Event.stopObserving(this.lastOutside,"focus",this.eventLastOnfocus);this.lastOutside=null;}},show:function(opts){this.preventFocus();if(!this.floatedToBody){this.parent=this.id.parentNode;document.body.insertBefore(this.parent.removeChild(this.id),null);this.floatedToBody=true;}
      ...

      If the page is rendered the first time, it works. If a part of the page is ajax rerendered, it sometimes fails.

      Does anyone has similar experience? If so, how to avoid this problem?

      Thanks,

      Filip