when i added multiple ajax function is not working.
what is the reason? how to solve this? .
here i want to load function1() data first, followed by function2() data in the webpage..reply plzz.
$(document).ready(function () {
function1(),
function2()
});
function function1() {
$.ajax({
type: "POST",
contentType: "application/json; charset=utf-8",
url: "WebService.asmx/f1",
data: {},
dataType: "json",
success: function (data) {
},
error: function () {
alert("Error while Showing update data");
}
});
}
function function2() {
$.ajax({
type: "POST",
url: "WebService.asmx/f2",
data: '{}',
contentType: "application/json; charset=utf-8",
dataType: "json",
//success: OnSuccess,
success: function (data) {
},
error: function (response) {
alert("Error");
}
});
}