Ext.util.JSONP.request({
url: '/Home/GetMessagesMobile',
callbackKey: 'callback',
params: {
lat: geoip_latitude(),
lng: geoip_longitude(),
rad: 1,
sType: 0,
flow: 1,
lastId: 0,
lastRow: 0,
uniqueify: Math.random()
},
callback: function (data) {
var messages = data;
alert(messages);
home.update(messages); // refresh messages
}
});
Although I can successfully reach the breakpoint in my MVC action and verify that data is being returned, the alert
never pops up, and there seems to be no client-side activity. It appears that the callback
function is not being executed for some unknown reason.
Should I modify this request in any way? The action is returning a result in JSON format. Here is the snippet of code:
return Json(retval);
The variable retval
contains a collection of objects that align with the html template parameters used elsewhere in the Sencha code. Even if there are discrepancies in matching these parts, I should still see the alert message, right?