Following script demonstrates use of setInterval method.
If you submit a form,client is notifiead after server processed whole script. If your database actions run asynchronously independetly on original thread, you can use some kind of sleep/while loop in the original server thread/script. So there will be no need of further AJAX request. Of course this is only aplicable if these operations take relative short amount of time.
1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
11:
12:
13:
14:
15:
16:
17:
18:
19:
20:
21:
22:
23:
|
|
Open in New Window
Select All