perl-embperl mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Gerald Richter" <rich...@ecos.de>
Subject Re: How to flush output buffers?
Date Tue, 20 Apr 2004 19:15:33 GMT
Hi,

>
> I've been developing a big project using Embperl as
> tool to build web based user interface. So, I have some
> places where called log-running functions.
> I'd like to show to user some helpful message ('Please wait or
> some progress bar') while those functions don't return result.
> Than, I'd like to redirect user to the result page.
>
> I've tried to do that using mod_perl handler but problem
> that Embperl handler doesn't work.
>
> Also, I'd like to know how to flush buffers in the Embperl.
> I've tried to use
> [- $| = 1; -]
> but it doesn't work.
>

In Embperl 1.3 you can write

[- $dbgFlushOut = 1 -]

In Embperl 2 there is no way to flush buffers before everything is done.

What I do is to add a <meta equiv="refresh" content="3;....."> which will
refresh the page any n seconds and display a status. Of course in this case
you need to run your task in background.

The other possbility is to display a text like "Please wait..." and do a
meta refresh at the _end_ of the page with time 0. On the page you load yo
do no output and run your long task. The browser will display the previous
page until it sees new output.

Gerald

---------------------------------------------------------------------------
Gerald Richter            ecos electronic communication services gmbh
IT-Securitylösungen * Webapplikationen mit Apache/Perl/mod_perl/Embperl

Post:       Tulpenstrasse 5          D-55276 Dienheim b. Mainz
E-Mail:     richter@ecos.de          Voice:   +49 6133 939-122
WWW:        http://www.ecos.de/      Fax:     +49 6133 939-333
---------------------------------------------------------------------------
Besuchen Sie uns auf der KOMCOM 2004 in Mannheim
25. bis 27. Mai 2004  Stand K11a   www.komcom.de

ECOS BB-5000 Firewall- und IT-Security Appliance: www.bb-5000.info
---------------------------------------------------------------------------


---------------------------------------------------------------------
To unsubscribe, e-mail: embperl-unsubscribe@perl.apache.org
For additional commands, e-mail: embperl-help@perl.apache.org


Mime
View raw message