-
12 May 2010 8:29 AM #1
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.
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.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]; . . .
Please help.
-
12 May 2010 11:22 AM #2
I have been doing some research on this problem.
Line 2723 of miframe-debug.js states the following...
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".Code:this.dom.src = s;
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.
-
12 May 2010 11:57 AM #3
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!


Reply With Quote