http://qs321.pair.com?node_id=468197


in reply to Mail Progress Bar

Another option, building upon the column by merlyn linked to by atcroft, would be to employ the Javascript XMLHttpRequest object to communicate with the server and update an element of your web page with the progress (as reported by the server) of a detached, long-running process. The advantage which this method would have (to my mind) is that you could browse away from the page and return at a later stage to check on progress (or have the process checked upon by non-initiators of the long-running process).

 

perl -le "print unpack'N', pack'B32', '00000000000000000000001000000000'"

Replies are listed 'Best First'.
Re^2: Mail Progress Bar
by cees (Curate) on Jun 19, 2005 at 23:30 UTC

    I was playing around with that stuff a couple of weeks ago to try and build an upload meter (something like Apache::UploadMeter but using XMLHttpRequest). I have a rough prototype of it working that you can check out here: http://cees.crtconsulting.ca/perl/examples/uploadmeter/.

    It was written to work with Firefox so you may not see anything if you are using another browser.

    The code is downloadable from that page, but remember that it is just a proof of concept (that means no documentation, just code). I am not using this stuff in production anywhere, but hope to wrap it up into a clean package at some point.

    Anyway, back to the question, it would be pretty easy to do a similar thing with a standard progress bar instead of as an upload meter.