Shao wrote: > Dear ALL, > > I am very much interested in using a HTML to fire off a data > processing script to run over the internet. > > I will be very grateful if you can advise me on passing parameters > from an HTML form to a script and fire the script off to carry out > full execution, monitor its progress and return an innerHTML with link > (a name string of) the file generated back to allow user to download > the result. > > The script run over a period of 2 to 3 minutes. > I designed a system to do something similar, but never implemented it fully.
Basically, a Django view would fire off a Python thread that would run the script, and report its progress. I chose to use a Django model that the Python thread would store its progress in. The progress was monitored by the end user via AJAX. It queried the progress of the job once a second or so until it was completed. I only implemented a proof of concept, where the script would only count to 100. Unfortunately, I didn't save the code. The project I was doing it for was scrapped. The proof of concept code was fairly easy to implement. I think it'd fit your bill. If you aren't familiar with AJAX, I suggest reading a tutorial about how AJAX works, and then consider using an AJAX library. Hopefully this gives you a good starting point. Jeff Anderson
signature.asc
Description: OpenPGP digital signature