You need to add
ajaxStart()
method to your code. Within this method, you can have any type of loading indicator, or changing the screens transparency etc...
$("yourDivOrAnyControl").ajaxStart(function(){
$(this).html("<img src="loadingImage.gif" />");
});
So, final code would look something like,
$(document).ready(function () {
$("yourDivOrAnyControl").ajaxStart(function(){
$(this).html("<img src="loadingImage.gif" />");
});
$.ajax({
cache: false,
async: true,
type: "GET",
dataType: "json",
url: "../Services/MasterServices.svc/DeleteList",
data: { name: vatid },
contentType: "application/json;charset=utf-8",
success: function (r) {
if (r != null) {
alert("Removed Successfully");
}
},
error: function (e) { alert(e.statusText); }
});
});
For more information please see this link
http://api.jquery.com/ajaxStart/[
^]