PDA

View Full Version : form submit dose not work



new
10 Feb 2010, 4:16 AM
Hi everybody
I have a FormPanel inside a window, i try Ext.getCmp('formID').form.sumbit() to submit the work it dosent work at all. i change it as follow but nothing as result.


showBody : function(grid,rowIndex,colIndex,e){
var rec = grid.getSelectionModel().getSelected();
this.stdEml = rec.data.enq_eml;
var pageWin = new Ext.Window({
modal : true ,
width : 700,
autoScroll : true,
layout : 'anchor',
bodyStyle : 'padding:10px',
height : 500,
items : [
{
xtype : 'panel',
//title : rec.data.enq_sbj,
anchor : '100% 20%',
boxMinHeight : 150,
bodyStyle : 'padding:10px;background-color:white;',
layout : 'table',
frame : true,
autoHeight : true,
layoutConfig :
{
columns : 2
},
defaults : {cellCls:'x-td-align'},
items : [
{
xtype : 'label',
text : 'Subject:',
style : {fontWeight : 'bold'}
},
{

xtype : 'label',
text : rec.data.enq_sbj,
style : {color:'blue'}

},
{

xtype : 'label',
id : 'enqLinks'

}
]
},
this.enqEmlHidFld

],
buttons : [
{
text : 'reply',
listeners : {
'click': {
fn : this.enqReply,
scope : this
}
}
}
]

});
Ext.Ajax.request({
url: 'http://'+context.host +'/admin',
method : 'post',
success: function(response){
var enqText = Ext.util.JSON.decode(response.responseText);
Ext.getCmp('enqBody').setText(enqText.body,false);
Ext.getCmp('enqLinks').setText(enqText.courceLink,false);
enqPageWin.show();
},
failure : function(response){
Ext.MessageBox.alert("fail: " + response.responseText);
},
params: {enq_id :rec.data.enq_id}
});
},
enqReply : function()
{
var fp = this.ownerCt.getForm();
fp.standardSubmit = true;
fp.url ='http://'+context.host+'/page:461';
this.enqEmlHidFld.setValue(this.stdEml);
fp.submit();
}
});

any solution?
thanks in advace