I have tried this answer.
This is my function, I call it when I click on the image.
function CheckOut(urlCheckoutNew,urlWebService) {
var inputData = JSON.stringify(getQuotation(urlCheckoutNew));
$('#imgloading').show();
$.ajax({
type: 'POST',
url: urlWebService,
contentType: 'application/json',
processData: false,
dataType: 'json',
data: inputData,
success: function (dataQuote) {
//alert(1);
$('#imgloading').hide();
}
});
}
This is my html :
<div id="imgloading" style="display:none;">
<img src="/Content/Images/ImageModal/loading.gif" alt="Confirming"/>
</div>
The function is in state success
the alert is working, but the image is not loading.
When the alert dialog is popup, I see the loading image is loading in the background. But when I commented the alert, the image didn't show.
Could any one tell me how could I do this?