PDA

View Full Version : problem to submit a form with multiple windows



crazy44
26 Apr 2010, 11:39 AM
Hi,

I have a problem to submit a formpanel that is composed of multiple windows.

I have the following error when I submit :

this.form.el is undefined

this is my code :



<html>

<script type="text/javascript">

function mysubmit(){

Ext.getCmp('myForm').getForm().submit({url:'/save'});

}

Ext.onReady(function(){

new Ext.form.FormPanel({
id:'myForm',
reader : new Ext.data.JsonReader({
successProperty: 'success',
}),
border:false,
defaults : {
xtype:'window',
layout:'form',
width : 'auto',
height : 'auto',
collapsible:false ,
expandOnShow :true,
defaults:{
xtype:'textfield'
},
style: {
margin: '5 5 5 5'
}
},
items:[
{
id:'win1',
x:0,y:0,
items:[
{id:'field1',fieldLabel:'field1',name:'field1'},
{id:'field2',fieldLabel:'field2',name:'field2'},
{xtype:'button',handler:mysubmit,text:'submitMe'}
]},
{
id:'win2',
x:200,y:200,
items:[
{id:'field3',fieldLabel:'field3',name:'field3'},
{id:'field4',fieldLabel:'field4',name:'field4'},
{id:'field5',fieldLabel:'field5',name:'field5'}
]}
]

});

Ext.getCmp('win1').show();
Ext.getCmp('win2').show();

});
</script>

<body>

<div id="w1"></div>
<div id="w2"></div>

</body>
</html>




thx :)

crazy44
26 Apr 2010, 10:21 PM
no idea ? :((

crazy44
27 Apr 2010, 9:04 AM
I'm in extjs 3.2.0