Forum OpenACS Development: ad_progress_bar extension: Continuously update status information

I was wondering if someone has written something like "ad_progress_bar_continue" which allows you to send new information about the progress to the progress bar.

The progress bar is nice to tell the user that things are happening, but e.g. in the installation I would like to show the user which package we are installing at the moment. The question I have though is "how".

As ad_progress_bar_begin opens the connection we could theoretically use ns_write to send more data to the connection, but that information will not show up in the progress bar. Could Javascript help here by setting the value to something else?

Or is there an Ajax solution we could easily use?

Hi Malte,

An example of the ajax solution you are looking for could be found on the sample below

http://extjs.com/deploy/ext/examples/dialog/msg-box.html

just click the "Show me" button under Progress dialog.

I can try and squeeze in a helper api in ajaxhelper to that widget when I update ajaxhelper later this week.

Best,

Ham

Hi Ham, that would be neat if you could squeeze it in. I am looking forward to your update of ajaxhelper!

Thanks
Malte

The latest version of ajaxhlper using template::head has been committed to CVS HEAD.

After upgrading/installing, please read ajax/doc/ on your local install for information about template::head.

The test that has a demo of the progress bar can be seen in ajax/www/tests/

However, while writing the api and the test, I realized that this solution might not be what you are looking for. The reason is that you need to stream the status from the server to the browser but javascript doesn't execute until the whole page is loaded. I tried using Ajax but it's the same thing.

Perhaps it's possible to use an iframe to output javascript as the install runs. This javascript will then update the progressbar on the parent page where the iframe is embedded.

I hope this helps. Good Luck !