1. #1
    Ext User rezib's Avatar
    Join Date
    Apr 2010
    Posts
    6
    Vote Rating
    0
    rezib is on a distinguished road

      0  

    Default ManagedIFrame ondocumentloaded event has no document

    ManagedIFrame ondocumentloaded event has no document


    Hello friends,

    I am working on a project that involves multiple IFRAME's. I'm using the ManagedIFrame object for this. I have all of the latest revisions (as far as I know).

    I have sub-classed Ext.ux.ManagedIframe.Panel and added the following code.

    Code:
    	/**
    	 * Define the call back functions for asynchronous events.
    	 * @cfg {object} listeners
    	 */
    	listeners:
    	{			
    		/**
    		 * When the document is fully loaded into the IFRAME, this
    		 * event will be called. We must clear the eventsFollowFrameLinks
    		 * flag and then inject the scripts.
    		 * @event documentloaded
    		 */
    		documentloaded: function(elem)
    		{
    			var doc = elem.getFrameDocument();
    			var body = doc.getElementsByTagName("body")[0];
    			var head = doc.getElementsByTagName("head")[0];
    .
    .
    .
    If elem.getFrameDocument() fails, you can see that nothing else will work. For the first IFRAME, getFrameDocument() works fine, but for subsequent IFRAME's it returns null.

    Please help.

  2. #2
    Ext User rezib's Avatar
    Join Date
    Apr 2010
    Posts
    6
    Vote Rating
    0
    rezib is on a distinguished road

      0  

    Default


    I have been doing some research on this problem.

    Line 2723 of miframe-debug.js states the following...

    Code:
     this.dom.src = s;
    Where "s" is the url passed to the setSrc method on the Ext.ux.ManagedIFrame.Element object. I noticed that for the first IFRAME, this.dom.contentWindow changes from "about:blank" to the new url content, but on the second invocation, this member variable is "undefined".

    I am not certain of any particular events that are triggered by this action, but my next test will be to try and load a page that has little or no javascript. I was loading http://google.com when I observed this problem.

  3. #3
    Ext User rezib's Avatar
    Join Date
    Apr 2010
    Posts
    6
    Vote Rating
    0
    rezib is on a distinguished road

      0  

    Default


    Aaaggghh!

    I feel like the original Church Lady from Saturday Night Live!

    NEVER MIND!

    You can't do what I'm attempting to do across domains!

    What a waste of my time!