# It is often convenient to emulate a text display on a browser during longer
# maintenance procedures.
 
use HTML::TextWindow;
$window = new HTML::TextWindow(
    TITLE=> 'Page Title',
    NEXT=> 'nextcmd.cgi?p1=1`button=``cmd2.cgi?p2=2`p3=3',
    BUTTON=> 'Process',
    EXITPATH=> '../art',
  );
# no NEXT: displays close button
# no BUTTON: runs next command immediately on load.
$window = new HTML::TextWindow( TITLE => 'test', CGI::commands());
 
print "A line on browser\n<h1>Tags allowed</h1>";
$window->display( @lines);# forces server to send to browser for display
$window->end( 'Final message in bold');# doesn't return
$window->error( 'Final message in red');# doesn't return
 
# For simple messages, these methods do it all (and don't return).
HTML::TextWindow::show( 'message'); # open, displays & close button
HTML::TextWindow::showError( $msg); # open, display red & close button