PDA

View Full Version : How panel could do this



kyousuke
7 Sep 2011, 12:09 AM
var menu = Ext.create("Ext.panel.Panel", {});
var main = Ext.create("Ext.panel.Panel", {});
Ext.create("Ext.container.Viewport", {
renderTo: Ext.getBody(),
layout: "border",
items: [menu, main]
});

When I click the menu, main panel will load a page test.jsp. Then I will click a button in test.jsp, it will forward to other page test2.jsp.But I want the test2.jsp load in the main panel. How to do it?

mitchellsimoens
7 Sep 2011, 10:13 AM
Are you using an iframe?

kyousuke
8 Sep 2011, 5:08 PM
Are you using an iframe?
frameset

mitchellsimoens
9 Sep 2011, 4:49 AM
Ok... let me try to remember how it was done from the 90s...

So the frame has a name... you should be able to do this:


parent.<frame_name>.location.href = 'http://www.sencha.com';