Andreas Schuldei wrote:
hi!

how can i implement some kind of progress indicator?

in one part of my app it is hard to tell for the user on the
remote webbrowser that something is happening and everything goes
according to plan (during account mass-generation).

how can i print out the processed usernames or just dots or some
other nice "we are getting there" indicator?

I feel this is a bit against  CGI::Applications basic way of
operation, since it usually outputs the *finished* page.

How do i do this cleanly and well integrated into the framework?
anyone with some example code?

Believe it or not, this is a question that is brought up many times here. Since I might not remember all of the good suggestions, you might want to search the archives.


Briefly, it involves taking the data to be processed, forking off a child to actually do the processing (or having a cron job/daemon doing the processing). Then you return a 'please wait' screen to the user maybe with an animated gif progress bar. This please wait screen will continually refresh. When the work being done in the background is finished, you can have it set some sort of flag/file, etc telling the 'please wait' page that is refreshing that it's done, so the next time it refreshes it shows the user what they want.

Or you could have the page returned to the user tell them that the results will be emailed to them (sometimes this is more appropriate/necessary if the processing takes several minutes or more).

HTH

Michael Peters
Developer
Plus Three

---------------------------------------------------------------------
Web Archive:  http://www.mail-archive.com/[EMAIL PROTECTED]/
             http://marc.theaimsgroup.com/?l=cgiapp&r=1&w=2
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Reply via email to