I 'm having a problem that I don't know how to deal with it. I want to make an ajax function, which polls for a server response.
Problem is that the response is dynamically constructed and the server returns an html page, which is either the wait page when
process has not yet completed, or the results page when process completes. I want to know, how can I show user the html page
returned to me. I tried using document.write but this does not seem to work. Here is the sample of the code I am using:
You'd be better off returning a status code and a URL when you need to replace the entire page, and redirecting.
posted 9 years ago
The thing is that I use the execAndWait interceptor of struts2, and I want to remove this annoying 'blink' effect that goes with using the
meta refresh tag. So for this purpose I do have to use Ajax to poll the server when the response is ready. Because the response is either
the wait page or the actual results when process completes, the status code is always 200. Also there is no URL, because response is generated
dynamically, only the data exist which I want to present to the user somehow.