title: How do I use Two ajax calls at the same time to process records and update the HTML?
body: <p>I am developing an application to process the daily credit card sales of a store. All the data necessary to process the transactions through the merchant is stored in a mySQL database. When the user clicks on "Process Transactions" a page loads displaying each transaction row by row in a HTML table. Using onLoad() I am using ajax to call a .php page which in turn queries the database for all the transactions, and then in a loop processes the transactions through the merchant and updates the database with either a success or fail. This part is working perfectly. </p>
  
  <p>My question is this: I would like to update the HTML table as the processing is taking place and turn the HTML table rows red for fail and green for success. Trying to do this in a For Loop (updating each row after each transaction processes) does not work. I know I can use AJAX setInterval() to call another .php page every 2 seconds which queries the database for completed records and updates the HTML table with the results returned. My .php pages are written and working. I have the AJAX set up and working for the first part (processing the transactions). What I need to know is where to put the 2nd AJAX call that updates the HTML table? Pseudo code will be fine or a link to an example would also be helpful.</p>
  
  <p>Thanks for your help!</p>