PDA

View Full Version : LOADING A DIFFRENT FORM USING A MENU BUTTON TO SAME WINDOW



atoto
12 Feb 2010, 5:31 AM
hi,
am very new to extjs how does one code to load a form (located in a diffrent file) from a button when clicked to appear in the same window having the menu bar and the buttons containing menus to remain active

tryanDLS
12 Feb 2010, 9:27 AM
Suggest you start by playing with examples in the download. These concepts are all covered. That's not to say you're going to find one example that does everything. You'll have to understand the concepts and the combine the relevant Components. When you run into issues post the relevant working code.

atoto
15 Feb 2010, 11:42 PM
i have tried playing with exapmles and came up with this code but it's still not working

Ext.getCmp('formcol.js').getForm().alert({params:{cmd:'load'}});

name of the other form is formcol.js

the rest of the code is here

Ext.onReady(function() {

var win = new Ext.Window({
width:650
,height:500
,renderTo:Ext.getBody()
,resizable:false
,title:'slams life'
,border:'true'

,ownerCt:'formcol.js'


,region:'left'
,autoScroll:true
,region:'centre'
,tbar:[{
xtype: 'tbbutton',
text: 'File',
menu: [{
text: 'New menu tree'

},{
text: 'Change password'
},{
text: 'Log off'
},{
text:'Exit'
}]
},{
xtype: 'tbsplit',

text: 'Parameters',
menu:[{
text: 'system parameter'

,menu:[{

text:'company details',

handler: function(){

Ext.getCmp('formcol.js').getForm().alert({params:{cmd:'load'}});
});
win.show();

});