I have a web engine that I wrote...and I do error pages in much the same manner that you want to do your "wait" page. The trick is to gather ALL the content of the page prior to printing it out.
What I would do is put everything into some sort of buffer in this manner:
Then I have a subroutine to print the code. So my main script looks like this (very simplified):# assume this is a snippet from a fully functional, declared, stricted + script my $buffer; $buffer .= "content\n<br>\n"; #or for long sets: $buffer .= <<END Content <br> More content <br> END
#!/usr/bin/perl -t use strict; include subroutines.pl; # I always put my subs for webapps in one pla +ce...and not in the main script. my $header = getheader(); my $footer = getfooter(); my $content = getcontent(); # This is where you'd run a bunch of chec +ks to see what you actually need print $header; print $content; print $footer; #eof
Now obviously...if you need to do a "waiting" screen much like you do...you'll need to use a meta tag to set the refresh. that will need to go into the header. So somehow figure out a way for the getheader() subroutine to check if it needs a refresh, and then refresh it.
Hope that helps.
--Coplan
In reply to Re: displaying output at the correct moment
by Coplan
in thread displaying output at the correct moment
by jcpunk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |