My code doesn't really matter, it sends and retrieves the correct info, but the question persists...
How can I verify if the action after my $.ajax call is done and if not perform until done?
Sometimes it performs the action sometimes it doesn't, it loops the request in this case the action:
$('#osa_stocka_'+completo_count+'_'+d).html(rt);
Rest of the code.
var data='id='+$('#osa_stocka_'+completo_count+'_'+d).attr("title");
var dataString = 'status=checkopapstock&'+ data;
$.ajax({
type: "POST",
url: "components/order/order_processing.php",
data: dataString,
success: function(rt){
//alert(rt+' > '+units);
if(rt > units){
$('#osa_stocka_'+completo_count+'_'+d).html(rt);
} else {
$('#osa_stocka_'+completo_count+'_'+d).html(rt);
$('#property_total_'+completo_count+'_'+d).val(rt);
}
}
});