Hi, I am calling Ajax number of times.and finally i will submit the form. Now before submitting the form ,I need to check whether all the ajax call is completed. How to do this? I need to submit the form only after completing all the IN progress request .
you can check value of readyState property: 0 The request is not initialized 1 The request has been set up 2 The request has been sent 3 The request is in process 4 The request is complete For further details, check this simple tutorial.. http://www.w3schools.com/Ajax/ajax_xmlhttprequest.asp
I am calling multiple ajax script So each one have different status . I need to check globally all the ajax calls outside the function. I am checking the status as you said inside each function but i need to do it globally outside the funstion.
for multiple ajax you would be making multiple ajax objects as well. put them all in array and create a function which checks each ajax object inside array for request status. if any of them has in-progress status, it can return false else true