For some business I need use synchronous for Ajax, could someone help me how to use, I find some code like this but not understand what it do.
function getData(productId, storeId) {
var returnHtml = '';
jQuery.ajax({
url: "/includes/unit.jsp?" + params,
async: false,
cache: false,
dataType: "html",
success: function(html){
returnHtml = html;
}
});
return returnHtml;
}