On 20 Feb, 15:32, wubin...@yahoo.com wrote:
Hi,
In the first start page, I use JavaScript window.open to open a new IE
window that is used to display real-time stock price and refresh each
10 seconds.
The problem is when ASP server restart, the real-time page will
display "... cannot display the webpage" and cannot back to normal
page automatically.
Is there any solution to let it recovers automatcally after ASP server
down temporarily?
Thanks,
Ben
use XHR in the opener to perform a HEAD request on the server, if it
doesn't come back 200, then you can set a boolean variable in called
freeze,
the child window must check its opener for this bool and then unhide
the "paused" msg if it is required to temporarily stop refreshing.
All you will need is some standard AJAX or an ifram in the opener and
a timeout loop in the child window rather than a meta refresh which is
probably what you are using at the moment.