Hello folks. I have another CGI related problem. I have a script that forks a number of jobs that need doing. I the main part of the script, I want to check whether the children are done. Each child sets a temp file, and the main script checks whether the temp files are still there. If so, then it generates an html page. If not, then it should generate a popup html page asking the user for more input. Once the user has given their input, the main script should continue with it's new set of tasks.
Here is my pseudo-code
create list of things that need doing
do
fork jobs
while jobs still running {
generate information HTML page
sleep 30 seconds
}
last if list of things to do empty
pop_up HTML page in new window for users to provide more input
wait for users input
until ( we've exhausted the list of things that need doing )
generate 'Thanks. We're all done now' HTML page
I have thought of doing the "wait for users input" bit using cookies. I would get the original loop to check whether the cookie is set. If so, then the user has pushed "OK", then we delete the cookie and continue in the loop.
My problem is that I am not sure how to really code this from a CGI perspective
Thanks people
H
Update: Steve_p - Changed title from YA CGI question
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.