So my javascript looks like:
try {
var response = $.ajax({
type: "GET",
contentType: "application/json; charset=utf-8",
url: "BudgService.asmx/LoadDetail",
data: "{'building': '63170', 'CurrentYear':'2014'}",
dataType: "json"
});
$.when(response).then(function () {
loadData();
});
} catch (err) {
alert(err);
}
function LoadData() {
alert('here');
}
And web service
[ScriptMethod]
public string LoadDetail(string building, string CurrentYear) {
return "[{color:\"red\", value: \"#f00\"}]";
}
But I never get to the loadData function and nothing gets populated into response.
What am I missing?
BudgService.asmx/LoadDetaildirectly in the browser ?