title: Call web service from ajax (jquery) inside a for loop
body: <p>I would like to know what is the best way to go in order to call a web service using the $.ajax (jquery) method, considering that I need to call that web service multiple times and each time pass a different argument to it.
  What I've tried so far:</p>
  
  <ol>
  <li>Enclose the ajax call inside a <strong>for</strong> loop, but of course that
  didn't work (one ajax call did not end properly before instantiating
  the next one - and that's when I remembered that the first 'a' in
  ajax stands for <strong><em>asynchronous</em></strong>). </li>
  <li>Use the $.each method (similar
  result as above). </li>
  <li>I thought about calling the web service
  recursively in the success callback option of the ajax call, passing
  one argument in each loop. Haven't gotten to this yet as I am not at
  my work's computer right now, but I was wondering whether there was
  a more elegant and faster way to approach the problem.</li>
  </ol>
  
  <p>Any other ideas will be more than welcome. Thanks in advance!</p>
  
  <p><strong>EDIT 1:</strong></p>
  
  <ul>
  <li>FYI, the web service is used to insert data into a MS SQL DB. </li>
  <li>The numbers of arguments may vary (I mean it's not a fixed number).</li>
  </ul>