jquery loop with ajax request works perfectly with an alert included, without alert fails?
<p>I have the below syntax which works 100% correctly and populates the corresponding checkboxes:</p>

<pre><code>for (var i = 1; i &lt; 30; i++) {     
$.post('get_sku_prices', {data: $('#product'+i).val()},function(result) {
    $('#price'+i).val(result);
    $('#adjustedprice'+i).val(result);
});
alert(i);
}
</code></pre>

<p>As mentioned working correctly. If I remove the alert and just have </p>

<pre><code>for (var i = 1; i &lt; 30; i++) {   
$.post('get_sku_prices', {data: $('#product'+i).val()},function(result) {
    $('#price'+i).val(result);
    $('#adjustedprice'+i).val(result);
});

}
</code></pre>

<p>The fields are not being populated without the alert, almost like the alert is forcing the page to refresh.</p>

<p>Any ideas? Thanks in advance...</p>
