I have a website that displays the results of sending email to the user via a popup window. The window opens and there is a delay before the confirmation message or error message appears. I would like to add an animation or at least "please wait ..." to the window.
The way it works is that window.open is called, then shortly thereafter PHP echo statement sends output to the window.
I tried adding a document.write immediately after the window is opened. That works to display "please wait", but it prevents the PHP script from being able to send any output.
I was hoping for a relatively easy solution that retains the present design. What am I missing?