Oliver Specht
2 Jul 2010, 4:49 AM
Hi,
I want to create a function which parses my ajax responses.
Now I am wondering which arguments the handler function gets?
I read http://dev.extjs.com/learn/Manual:Core:Ext.Ajax but that does not seem to be correct, because when I look at the arguments I have some form object as first argument (arg1). The second argument (arg2) contains a "response" and "options" attribute.
How can that be? And what is correct now?
My code:
function handleSuccessFailure(arg1, arg2)
{
console.log(response);
}
addUserForm.addButton({
text: 'Speichern',
formBind: true,
handler: function () {
addUserForm.getForm().submit({
waitMsg: 'Daten werden gesendet...',
success:handleSuccessFailure,
failure:handleSuccessFailure
....
I want to create a function which parses my ajax responses.
Now I am wondering which arguments the handler function gets?
I read http://dev.extjs.com/learn/Manual:Core:Ext.Ajax but that does not seem to be correct, because when I look at the arguments I have some form object as first argument (arg1). The second argument (arg2) contains a "response" and "options" attribute.
How can that be? And what is correct now?
My code:
function handleSuccessFailure(arg1, arg2)
{
console.log(response);
}
addUserForm.addButton({
text: 'Speichern',
formBind: true,
handler: function () {
addUserForm.getForm().submit({
waitMsg: 'Daten werden gesendet...',
success:handleSuccessFailure,
failure:handleSuccessFailure
....