Check Pending AJAX requests or HTTP GET/POST request
You would need to keep track of each XMLHttpRequest and monitor whether it completes or the asynchronous callback is executed.
How do i check if the page has pending AJAX or HTTP GET/POST requests? I use javascript and/or python for this checking. 
what i wanted to do is execute a script if a page has finished all requests. onload doesn't work for me, if you used firebugs net panel, you would know. onload fires when the page is loaded but there is a possibility that there are still pending request hanging around somewhere.
thank you in advance.