[dev] Ideas needed - progression widget / shell command
Jan Schneider
jan@horde.org
Wed, 27 Mar 2002 14:49:01 +0100
Zitat von Mathieu CLABAUT <mathieu.clabaut@free.fr>:
> The dirty (but working) way is to do something like :
> ob_end_flush(); $res=system("$exec_args 2>&1",$retval);
> in order to dump the output of the command on the web page (being sure
> that their is no table opened in the current web page, which would
> prevent HTML to be rendered before the end of the execution in most
> browsers).
But you can't depend on the webserver to really send the output generated
by your script immediately to the browser. There are definitely buffer
issues you have to consider.
> My question is :
> Does somebody know/imagine/have a nicer way to give a feedback to the
> user (something like a background process filtering mkisofs output,
> and sending only relevant information to an auto-refreshing web page,
> or to some javascript.... ?)
Javascript is possible but you must communicate to the process in any way.
One solution would be that you call your process nohup and then reload the
page subsequently but only ask the process for its status. If this is
possible at all.
Another way would be to use a hidden frame that reloads permanently and
that changes progress indicator on the "main" screen with javascript. But
once again you must find a way to gather status information from the
running process.
Jan.
--
http://www.horde.org - The Horde Project
http://www.ammma.de - discover your knowledge
http://www.tip4all.de - Deine private Tippgemeinschaft