Does the DS have any way for me to capture and handle jsonp errors?
Is there a best practice?
I've tried this, but nothing happens (no alerts)
Is there a best practice?
I've tried this, but nothing happens (no alerts)
dataSource:
new
kendo.data.DataSource({
serverFiltering:
true
,
transport: {
read: {
url:
function
(e) {
var
value = $(
"#activityTypeBox"
).data(
"kendoDropDownList"
).value();
if
(value !=
""
) {
return
"http://site/api/activities/getByType/id/"
+ value +
"/format/jsonp"
}
},
dataType:
"jsonp"
,
jsonpCallback:
'myCallback'
},
parameterMap:
function
(data, type) {
}
},
schema: {
errors:
"error"
// ex: twitter's response is { "error": "Invalid query" }
},
error:
function
(e) {
alert(
"Problem populating the curriculum db activities based on that type"
);
}
})