http://www.perlmonks.org?node_id=57407


in reply to (crazyinsomniac) Re: (2) (crazyinsomniac) Re: File upload progress?
in thread File upload progress?

Well, that's 99% true :-)

If you make the assumption that the user has JavaScript (but code for the case where they don't, as well!), you could open up a new, miniature browser window (with window.open) and set its URL to something like http://www.whatever.fu/upload/upload-status?id=xxx with an HTTP Refresh: header in that script. If you refresh every 3-5 seconds, you could display a 'status bar' and/or percentage/number of bytes/transfer speed...

Just link the JavaScript to the form's submit button. (Sorry, my E-262's really rusty or I'd try to offer some sample code, but I'd probably do more harm than good in this case! :-) ) -- I forget which way it goes, but if you return (true | false ? ) from your window.open call in the onClick (?) handler, the form won't submit, but run your code instead, so make sure to RTFM :-)