JavaScript - forcing line to execute within a loop in Chrome?
<p>I have a while loop:</p>

<p><code>
    x = true; <br />
    while (x == true) { <br />
&nbsp;&nbsp;        document.images['id'].src = arr[i]; <br />
&nbsp;&nbsp;         i = i+1; <br />
&nbsp;&nbsp;         x = confirm('do you want to see more?') <br />
    } <br />
</code></p>

<p>
This shows me each image and then asks if I want to see more on firefox and ie, but in chrome and safari, it only displays the image after I leave the loop. I know this is efficient, but I'm wondering if there's a way to force execution of the line within the loop as I go along? 
</p>

<p>
Thanks for input! 
</p>
