title: Datatables rows().every() with ajax request inside
body: <p>i'm trying to update an input fields inside of datatable on each row, but first i take a value from a cell and send it to ajax to get a value and then update de input field with this value.</p>
  
  <p>the principal problem es that rows().every() is executed more fast than ajax and just one row is updated.</p>
  
  <p>here is the code that i'm using:</p>
  
  <pre><code>updatePrices(0.95);
  
  function updatePrices(freight){
    table.rows().every(function () {
     var sk = table.cell(this,2).data(); // HERE I GET THE VALUE OF DATTABLES TO SEARCH THE PRODUCT AND ITS PRICE.
  
     var dataString = 'sku='+ sk;
  
     $.ajax({
         type: "POST",
         url: "searchProductBySku.php",
         data: dataString,
         dataType: 'json',
         cache: false,
         success: function(data){
            newprice = parseFloat(data[9])+parseFloat(freight);// RETURN NEW PRICE AND SUM THE FREIGHT COST
  
  
   table.cell(this,9).nodes().to$().find('input').val(parseFloat(newprice).toFixed(2)); // AND CELL WITH INPUT IS UPDATED
  
          }
       });
    });
   alert('Prices were updated, please check them before send this order.');
  
  }
  </code></pre>