bomslang
16 Jul 2012, 8:43 AM
Hello,
I have a ExtJS form with fields like below
Name Field ( Note : Multiple comma separated names are allowed )
Age Field
Email Field
I want to submit this form values to the server side and notify the about the same (success or failure) to the email address provided in the email field i.e 3rd form field.
Since there could be multiple names in the name field, I don't want to get multiple response for this single form submission.
I don't want to send multiple form submission Ajax request.
I want to submit the multiple names in a single Ext.Ajax.request() and then send a SINGLE notification to the email address value.
How to achieve this ? How to correctly apply Ext.JSON.encode correctly ?
e.g
var values = Ext.getCmp('myForm').getValues();
Ext.Ajax.request({
method : 'POST',
url : ' ../../save.php',
params: Ext.JSON.encode(values),// How to encode multiple name values here?
success: function(response) {
Ext.Msg.alert('Data submitted to all people');
},
failure : function(response) {
Ext.Msg.alert('Error while submitting data to all people');
}
});
Thanks
I have a ExtJS form with fields like below
Name Field ( Note : Multiple comma separated names are allowed )
Age Field
Email Field
I want to submit this form values to the server side and notify the about the same (success or failure) to the email address provided in the email field i.e 3rd form field.
Since there could be multiple names in the name field, I don't want to get multiple response for this single form submission.
I don't want to send multiple form submission Ajax request.
I want to submit the multiple names in a single Ext.Ajax.request() and then send a SINGLE notification to the email address value.
How to achieve this ? How to correctly apply Ext.JSON.encode correctly ?
e.g
var values = Ext.getCmp('myForm').getValues();
Ext.Ajax.request({
method : 'POST',
url : ' ../../save.php',
params: Ext.JSON.encode(values),// How to encode multiple name values here?
success: function(response) {
Ext.Msg.alert('Data submitted to all people');
},
failure : function(response) {
Ext.Msg.alert('Error while submitting data to all people');
}
});
Thanks