i have a PHP process who send X mailsAfter each mail send, i add a line on a database for tell that a mail is send.So, i wan't to create a progress bar for tell to the user that X mails are sended on Y ( Y = total)I have two jquery function like that :\[code\]function mail_send(){ $('.loading').css('display','block'); $.ajax({ 'url': '/an/url/', 'data': { someParam: param }, 'beforeSend':function() { $('#loadingBg').append('<span id="count"></span>'); setTimeout(function () { mail_updateProgress(id); }, 500); } , 'success': function (data,textStatus) { (....) } });}function mail_updateProgress(id) { $.ajax({ 'url': '/an/url/', 'data': { someParam: param }, 'success': function (data) { var res = $.parseJSON(data); $('#count').html(res.nbSended + '/' + res.total); } });}\[/code\]The problem is that i can't send more than 15 mail right now and i'll not create XXX mail adresses for test it, but the updateProgress() function just success one time and it's happen in the same time of the mail_send() function.Is there an error ?thanksEDIT : Ok, so setInterval is good, but i have a second problem, Is there a queue for the $.ajax ?I'm loggin 3 things :first : When the process is enter on the updateProgress functionsecond : when the updateProgress ajax is successedthird : When the mail_send() ajax is successedthe order of the log is fisrt (X times )Third (1time)second(X times)so, my progress bar never progress, just make 0% => 100% when the send function is endedany idea to process the progress function while the send function ?is it possible to delegate ?