I am trying to create cross domain ajax script but I am little struggling as to why the ajax function is outputting undefined
in the table id, instead of correct dynamic data.
$(document).ready(function () {
$.support.cors = true;
$.ajax({
type: "Post",
crossDomain: true,
contentType: "application/json; charset=utf-8",
url: "http://localhost:27335/test2.aspx/BindDatatable",
data: "{}",
dataType: "json",
success: function (data) {
console.log(data)
for (var i = 0; i < data.d.length; i++) {
$("#tbDetails").append("<tr><td>" + data.d[i].Name+ "</td><td>" + data.d[i].Loan + "</td><td>" + data.d[i].Evnt + "</td></tr>");
}
},
error: function (result) {
alert("Error");
}
});
});
Thanks in advance for any assistance.