title: Breaking loop from outside the loop
body: <p>I have a search form with default values.
  As the user loades the page, onload I call a function.</p>
  
  <p>This function has a loop, which calls a Ajax Request with each iteration.</p>
  
  <p>I take about 20 to 30 Seconds will all the Ajax Request are executed.</p>
  
  <p>During these Iteration user can change form values and can Submit the form
  before these iterations are completed.</p>
  
  <p>Is there a way to break that loop as the user clicks on the submit button?</p>
  
  <p>Thanks.</p>