Quantcast
Channel: Microsoft Dynamics CRM Forum - Recent Threads
Viewing all articles
Browse latest Browse all 46379

Loading image in ajax call in html page added in dynamic crm is not working in chrome

$
0
0

I have a html page where i want to display processing with loading image between ajax call for save and its success. And that page i put in dynamics crm as webresourse.

Problem is that Loading works fine in firefox but not working in chrome.

<script src="ajax.googleapis.com/.../jquery.min.js"></script>
<img src="sm_loading.gif" id="loading" style="display:none" />
<input class="custom-btn" id="btnsave" value="Save" onclick="SaveData();"  type="button">
function SaveData() {
	$('#loading').show();
	var stocktrack = {};
	stocktrack.sm_Description = descval;
	var jsonPO = window.JSON.stringify(stocktrack);
	var oDataUri = serverUrl + "/XRMServices/2011/OrganizationData.svc/sm_stocktrackingSet";
	$.ajax({
		type: "POST",
		contentType: "application/json; charset=utf-8",
		datatype: "json",
		url: oDataUri,
		data: jsonPO,
		async: false,
		beforeSend: function (XMLHttpRequest) {
			XMLHttpRequest.setRequestHeader("Accept", "application/json");
		},
		success: function (data, textStatus, XmlHttpRequest) {
			debugger;
			$('#loading').hide();
		},
		error: function (XMLHttpRequest, textStatus, errorThrown) {
			alert(textStatus);
		}
	});
}
									


Please suggest if any solution is there.


Viewing all articles
Browse latest Browse all 46379

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>