Date:  01/21/2010 03:12:19 PM Msg ID:  004113
From:  FoxWeb Support Thread:  004111
Subject:  Re: Script takes time - progress bar?
It is possible for FoxWeb to provide a progress bar during processing and in fact this forum implements such a progress bar (if you are logged in, try viewing the unfiltered content of this forum, by clicking on the Filter icon). Progress bars in Web applications are typically implemented with Javascript, or Flash (I recommend Javascript).
For working code sample, do a web search for "javascript progress bar". Some of the sites mention Ajax, but you can also use Javascript progress bars in a regular page, by sending Javascript code while your program is running. Note that this is only possible if your program does not do its processing with a single command. Here's an example:

...Send the Javascript code that implements the progress bar framework

... Call the Javascript method that displays the progress bar

FOR i = 1 TO 100

    ...Some command that takes some time to perform...

    Response.Write('<script type="text/javascript">UpdateBar(' +STR(i) + ')</script>')


... Call the Javascript method that hides the progress bar

FoxWeb Support Team email
Sent by Gregg Barfield on 01/20/2010 10:04:19 PM:
I have seen old posts that say progress bars are not possible while "long" scripts are running but they were for older versions of Foxpro.  Is it possible now?    I have a script that is taking about 5 minutes to calculate all the variables and the user justs sees a blank screen - probably thinks the program crashed.

Any help would be apprecitated.   Thanks.