JavaScript For Loop shows last iteration for window.location
<p>I've searched and found that it is something about closure and scope. But unfortunately I couldn't implement those sample solutions into my case.</p>

<p>Here what I'm trying to do:</p>

<pre><code>for (var i = 100; i &lt; 110; i++ ) {
    window.location = "www.example.com/bet.php?ip=100.100.100." + i + "&amp;bet=55";
}
</code></pre>

<p>It should submit a bet '55' from different IP's according loop range and wait for about 5 seconds after each bet until XML result appears.</p>
