I have a question on the xmlhttprequest object. Let's say I create a xmlhttprequest object X to handle a user's request(asynchronously) to the server. For some reason, the server take 15 seconds to response. During those 15 seconds, if the user click on another button, how am I going about to determine the existence of the the first xmlhttprequest object I created in order to act accordingly (either telling the user that he/she needs to wait for the first request to finish or cancel it and continue with the second one.)
In short term, I need to know whether there is any request is being processed in order to handle another request.
Thank you in advance.