Why am I getting undefined in data.length in the ajax.sucess?
Here is the code,some parts have removed for sake of brevity:
$.ajax({
data: JSON.stringify(data),
url: urlGetProviderQualificationTimeData,
type: 'POST',
contentType: "application/json; charset=utf-8",
success: function (data) {
if (data.length > 0) {
$("#loading").hide();
$("#providerqualification-main").show();
$("#tblProviders").show();
SetHeaderFields(data);
} else {
$("#NoRecordFound").show();
$("#providerqualification-main").hide();
}
},
complete: function (e) {
$("#loading").hide();
}
});