-
20 Feb 2009 8:42 PM #1
BorderLayout window inside the ParentWindow
BorderLayout window inside the ParentWindow
Sorry for my poor English!
the ParentWindow code:
The BorderLayout Window in 'myProject/test.jsp'Code:var button = Ext.get('show-btn'); button.on('click', function(){ var win = new Ext.Window({ id : 'pw', title : parent window, width : 840,height :680, autoLoad:{url:'myProject/test.jsp',nocache:true,mode:'iframe',scripts:true}, autoScroll:true, iconCls : 'bogus', shim : false, animCollapse : false, constrainHeader : true }); } win.show(button); });
At the frist time it worked very well,but from now the borderLayout Window do'n work,and IE showed a error:"Invalid argument" at ext-all-debug.js's line:Code:<script type='text/javascript' > var childWin = new Ext.Window({ layout:'border', applyTo:'childWin', width:640, height:470, stateful:false, items:[{ region:'west', split: true, collapsible : true, margins:'3 0 3 3', cmargins:'3 3 3 3', width:320, contentEl:'div1' },{ region:'center', margins: '3 3 3 0', defaults:{autoScroll : true}, width:320, contentEl:'div2' }] }); childWin.show(); Ext.getCmp('pw').on('close',function(){ childWin.close(); }) </script> <div id='childWin'></div> <div id='div1'></div> <div id='div2'></div>
please help me!Code:realign : function(l, t, w, h) { if (!this.el) { return; } var a = this.adjusts, d = this.el.dom, s = d.style; var iea = 0; s.left = (l + a.l) + "px"; s.top = (t + a.t) + "px"; var sw = (w + a.w), sh = (h + a.h), sws = sw + "px", shs = sh + "px"; if (s.width != sws || s.height != shs) { s.width = sws; s.height = shs; // s.height is null if (!Ext.isIE) { var cn = d.childNodes; var sww = Math.max(0, (sw - 12)) + "px"; cn[0].childNodes[1].style.width = sww; cn[1].childNodes[1].style.width = sww; cn[2].childNodes[1].style.width = sww; cn[1].style.height = Math.max(0, (sh - 12)) + "px"; } } },
-
20 Feb 2009 9:09 PM #2
State what your goal is.
MJ
API Search || Ext 3: docs-demo-upgrade guide || User Extension Repository
Frequently Asked Questions: FAQs
Tutorial: Grid (php/mysql/json) , Application Design and Structure || Extensions: MetaGrid, MessageWindow
-
20 Feb 2009 9:59 PM #3
I want to spring the window has a Border layout ,
but I can not do that at main page (alert the parent window) ,because of some demands
Therefore I can only make a layout in the parent window's autoload.url
-
21 Feb 2009 12:55 AM #4
please help me,thanks everyone!
-
21 Feb 2009 4:41 AM #5
Sorry, I don't understand. Maybe if you post a working showcase someone will be able to understand what your goal is:
http://extjs.com/learn/Ext_Forum_Hel...rking_showcaseMJ
API Search || Ext 3: docs-demo-upgrade guide || User Extension Repository
Frequently Asked Questions: FAQs
Tutorial: Grid (php/mysql/json) , Application Design and Structure || Extensions: MetaGrid, MessageWindow
-
21 Feb 2009 6:27 AM #6
Don't use applyTo.
Only use contentEl if you MUST use some existing content.
It's best to start with an empty document. Ext creates all the elements it needs.Search the forum: http://www.google.com/coop/cse?cx=01...%3Az7of1ufqccu
Read the docs too: http://extjs.com/deploy/dev/docs/
Scope: http://extjs.com/forum/showthread.ph...642#post257642
-
21 Feb 2009 7:32 AM #7
Thanks Animal and mjlecomte,
Sorry,my English.....
I tried contentEl , It's OK, but the InsideWindow can move out of the parentWindow's scope,I hope the InsideWindow inside of the parentWindow.
My case like the web-desktop of Samples, one window as one module ,so I used Ext.Window.autoLoad to open a Jsp,I need to creat some componentes in that jsp,so
the jsp Impossible is an empty document



Reply With Quote