PDA

View Full Version : [solved] How to catch old iframe calls



steffenk
6 Sep 2010, 3:17 PM
Hi,

i refactored an app where a native iframe was rendered before, now there is a panel with bodyCfg - tag iframe.
I set the source of iframe by this call:
TYPO3.Backend.ContentContainer.body.dom.src = url

before the iframe was set by call
parent.list_frame.location.href=url

Now i want to catch "old" calls using the new method, so
call parent.list_frame.location.href=url should do TYPO3.Backend.ContentContainer.body.dom.src = url

i tried something like setting

top.list_frame = TYPO3.Backend .NavigationContainer.body.dom;

but it's wrong as dom has no property location.

Any idea how to do?
(I need this because extensions using the old call should not stop working)

Condor
6 Sep 2010, 10:44 PM
You need to set list_frame to the iframe contentWindow, e.g.

var iframe = TYPO3.Backend.NavigationContainer.body.dom;
top.list_frame = Ext.isIE ? iframe.contentWindow : window.frames[iframe.name];
(and you need to give the iframe a name)

steffenk
7 Sep 2010, 12:37 AM
very good, thanks Condor!