zonky has asked for the wisdom of the Perl Monks concerning the following question:

Hi, I wrote a CGI script that puts out some HTML code with some default data at the first step. This step is only that there's anything on the screen, while executing the rest. (Doing several pings to determine whether a couple of computers are still available for connection) After that there will be a state information for each computer. But my problem is, that when I output the code (it is outsourced in a module) a second time, it only puts it out at the end of the existing document. Now I want to clear the first output, before the second invocation is done. Also the output of the ping-command is shown on the screen despite of using the "-q"-parameter. It would be great if someone has a simple solution for that. I now try half a day on this mud ;) Thanks before... Greets, Marcel
  • Comment on Clear browser window while executing CGI script

Replies are listed 'Best First'.
Re: Clear browser window while executing CGI script
by Corion (Patriarch) on Jun 13, 2007 at 13:51 UTC

    merlyn wrote a column on that: Watch long process through CGI. To capture the output of programs, you best redirect that output into a file and read from that file whenever the page is refreshed.

Re: Clear browser window while executing CGI script
by fenLisesi (Priest) on Jun 13, 2007 at 14:09 UTC
Re: Clear browser window while executing CGI script
by GrandFather (Saint) on Jun 13, 2007 at 21:21 UTC
Re: Clear browser window while executing CGI script
by pajout (Curate) on Jun 13, 2007 at 14:55 UTC
    Why you don't integrate some javascript piece to the html, which will reload the page after some seconds?