PDA

View Full Version : Load content to a tab from other file



hurairah
7 Mar 2011, 9:55 AM
hi,

I'm a beginner and need help. :-/

The scenario is like this, I hv 2 panels, 1 panel contain an iframe content (refer to a dynamic page) and another panel contain a tab panel. Let say in the i want to refer or load content to a tab panel from the iframe content, how should i do it.

If the question has been asked before...please refer me to the thread

tq

bryall
7 Mar 2011, 1:34 PM
Need more details... what exactly are you having issues with? Are you trying to get the tabpanel and put data into it or are you having trouble getting information out of an iframe?

If it's the tabpanel you're having difficulty retrieving give the tabs a unique ID and call Ext.getCmp('myNewTab') and then update it ( or add a component, whichever necessary to complete your action )

hurairah
8 Mar 2011, 6:00 AM
thank bryall for the reply.

actually like this, in the 1st panel, the content are iframe which to test.php and the php file contain list dynamic of link from a database. What i want to do is when the user click on the link in the test.php it will open specific tab in the second panel. Is there any problem if i do the extjs coding in the test.php (iframe) to refer to the tab.

bryall
8 Mar 2011, 6:45 AM
You would need to call a function from the parent window... so in your iframe I would have a function that looks something like....



if(parent.window) {
if(typeof parent.window.someFunction == 'function') {
parent.window.someFunction(someParam);
}
}