PDA

View Full Version : Response not showing



cabster
27 Jan 2010, 6:55 AM
I can't seem to read my response code from my proxy.

message.success works but my response.message is saying undifined.

code:


proxy.on('write', function(proxy, action, data, response, rs) {
console.info('write: ', action);
alert(response.success);
alert(response.message);
alert(response.id);
});



json returned


{"id":0,"success":true,"data":{"id":0,"name":"Test","adress":"Test","zipcode":"Test","city":"Test"},"message":"Kerk is ingevoerd."}

mitchellsimoens
27 Jan 2010, 8:53 AM
I think your json isn't formatted properly.

Should it'd it be:


({"id":0,"success":true,"data":[{"id":0,"name":"Test","adress":"Test","zipcode":"Test","city":"Test"}],"message":"Kerk is ingevoerd."})