PDA

View Full Version : problem in submitting form



malviya.prashant
25 Sep 2009, 1:26 AM
problem in submitting form i want to open other jsp page or want to call servlet so i am using following code, it is always showing success is not defined in FireBug console. how to solve this problem-

See following code:

var panelfield = new Ext.form.FormPanel({
labelWidth: 100,
frame: true,
title: 'Version 1.0',
bodyStyle: 'padding:5px 5px 0',
width: 568,
height:200,
collapsible:true,
defaults: {width: 100},

items: [{
xtype:'textfield',
fieldLabel: 'Site Code',
name: 'first',
anchor:'95%'
}],
buttons: [{
text: 'Update Site',
handler: function() {
panelfield.getForm().getEl().dom.action = '/updateServ.jsp';
panelfield.getForm().getEl().dom.method = 'POST';
panelfield.getForm().submit({
success:true

});
}


},{
text: 'Remove Site',
handler: function() {
panelfield.getForm().getEl().dom.action = 'http://localhost:8080/Prototype/DeleteServ';
panelfield.getForm().getEl().dom.method = 'POST';
panelfield.getForm().submit();


}
}]
});

panelfield.render('panelfield');





please help ; thanks in advance

Nagadev
25 Sep 2009, 1:54 AM
You want to submit the form in standard way. So you need to configure standardSubmit:true