If this is your first visit, be sure to
check out the FAQ by clicking the
link above. You may have to register
before you can post: click the register link above to proceed. To start viewing messages,
select the forum that you want to visit from the selection below.

AJAX synchronous - problem !!!

hi,

what I want to do is this: when the page is loaded, I'm calling some JS function, who is using prototype class, and make an ajax request, to some php file, in that file..I'm updating some stuffs in the database. This is taking some time..there is alot of records, so..what I'm trying to do..is showing in Real time, each record..that was updated. so I've made a second function. The problem is that, he is finishing the execution of the first file..and after that his displaying each record updated..and the DONE text. I need him to do this in the same time.

If anyone can help me please, I've tried many thinks..and couldn't make it.

You'll need to use setInterval() to create an ajax request that repeats itself. It would call some PHP function that checks the session to see which records have been updated. You'd be using asynchronous AJAX in this case.