PDA

View Full Version : Always failure



Cem
2 Mar 2010, 1:45 AM
Hi,

I do not know the reason but in all case my success function could not be called despite having a success response from server.



var live_panel = new Ext.FormPanel({
labelWidth: 75,
frame:true,
title: 'Reklam? Form',
bodyStyle:'padding:5px 5px 0',
width: 1250,
defaults: {width: 230},
defaultType: 'textfield',
items: [{
fieldLabel: 'User ID',
name: 'userId'
}
],

buttons: [{
text: 'Ara',
handler: function(){
if(live_panel.getForm())
{
live_panel.getForm().load(
{
url:'/service/backoffice/personal/promotion/clickers',
params:{userId: 112},
method: 'GET',
failure: function(form, action){
console.log(action.failureType);
console.log(action.response);
console.log(action.result);
console.log(action.type);
},
success:function(form, action){
console.log("success");
}
}
);

}
}
}
]
});


I can see successful GET requests in my firebug console however always failure function is called...

Any reason about this?

Cem
3 Mar 2010, 4:40 AM
Sorry for posting in wrong place...

Animal
3 Mar 2010, 5:00 AM
Is your JSON valid according to http://www.extjs.com/deploy/dev/docs/?class=Ext.form.Action.Submit ?