I have what may be a conceptual issue to contend with. I'm not even sure what tags to put it under...
I have an ASP.NET web form application. It has <form method="post">
and uses traditional submit from pages, and server replies with response of new page. It does not use AJAX, callbacks or other asynchronous techniques. It uses JavaScript, but not jQuery.
I have been asked to put up a "modeless window" with "processing, please wait" type message when the user starts a submit for a "long operation".
I have written that part of the code, having JavaScript place a DIV with high z-order on the page when the submit starts. The principle is that when the new page is returned in the response, it replaces the current page and the modeless window goes away too, of course.
All seemed well, till I looked at what happened when, for example, the user action caused the application to send back a file. The web browser asks the user what to do with it, and meanwhile my message is still there. More importantly, the application does not send any new page at all (it just does a Response.End()
), so the user is left on the original page with the message still there forever. Another path of code might send back a "response status code 204 no content".
The above is only an example of what a button on the page might ask the server to do. The bottom line is that if the server is not going to send a new page back, I (think I) need to know in the original page's JavaScript when the server has started/completed whatever response it is going to produce so that it can remove the "modeless window".
Is anything possible, given that the page is being submitted from the client?