I've been researching my particular problem for a few days and haven't really come up with a solution yet, so I'm coming to the knowledge base for answers.

I have a web page with a form in it. When the user submits the form, a cgi script runs one or more commands (via ssh on another server) in the background, then displays the results on another web page. The problem is, some of these commands (syncing directories for example) take a really long time to complete. I really don't want the user to sit there and wonder if the script is working.

So, I'd like to be able to display the progress of the cgi script, possibly in a popup, so the user knows what's happening and can be confident that the script is actually running. When the cgi script is complete, the results should be displayed in the original browser window.

I should note that some of the commands return actual data (e.g. id -G username) and some just comments about what is happening (rsync). The actual results are used to compose other web pages that give the user more choices in another form.

There is no code to show you because I'm doing this in a closed network not connected to the Internet. But I could retype some of the code if needed.

Thanks in advance!


In reply to Displaying the progress of a CGI script in a popup window? by wveagle81

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • 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:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.