Hi colleague!
Problem
I develop an application with web intrface for my company.
That application includes Perl classes and Embperl scripts.
There are some places which take much time to retrieve results. So, I need to display for user some helpful message like 'Please wait' or animation picture which imitate progress bar.
Solution
I've found and stydied merlyn's solution Watching long processes through CGI. But I've decided to go by other way. My choise was occasioned following reasons:
- I did'n want to pass to the web server many requests
- I didn't want to make many changes in my scripts
- I did'n want to touch logic inside classes
- There is not possibility to flush buffers in the Embperl
So, I've implemented a following logic: if user call some of long running operations, request is passed to the special page -
wait page. That page is Embperl script which displays helpful message, parses request arguments and does redirect to the target script (defined as request parameter) which execute long running operation.
So, the user watches display message untill that operation is not finished (Embperl is not flush buffers). Than result page loads and the user can see results.
I'd like to know your opinion about that solution. Thanks in advanced.
Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
Read Where should I post X? if you're not absolutely sure you're posting in the right place.
Please read these before you post! —
Posts may use any of the Perl Monks Approved HTML tags:
- a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
| |
For: |
|
Use: |
| & | | & |
| < | | < |
| > | | > |
| [ | | [ |
| ] | | ] |
Link using PerlMonks shortcuts! What shortcuts can I use for linking?
See Writeup Formatting Tips and other pages linked from there for more info.