Tuesday, January 12, 2010

JQuery JSON disable asynchrounous call

jQuery.ajax({
url: hostBlogUrl + getDaysInMonthWithEntryService,
type: "POST",
contentType: "application/json; charset=utf-8",
data: "{'blogID':'" + pBlogID + "', 'month':" + pMonth + ", 'year':" + pYear + "}",
dataType: "json",
success: function(response) {
var daysArray = response.d;
days = daysArray;
return daysArray;
},
error: function(req, status, er) {
alert("An error occurred whilst submitting your request.\r\n" + status + " " + er);
},
async: false
});

No comments:

Post a Comment