ONLINE HELP
 WINDEVWEBDEV AND WINDEV MOBILE

This content has been translated automatically.  Click here  to view the French version.
Help / WLanguage / WLanguage functions / Web-specific functions / Progress bar functions
  • Operating mode
  • Equivalences
WINDEV
WindowsLinuxJavaReports and QueriesUser code (UMC)
WEBDEV
WindowsLinuxPHPWEBDEV - Browser code
WINDEV Mobile
AndroidAndroid Widget iPhone/iPadIOS WidgetApple WatchMac Catalyst
Others
Stored procedures
Warning
From version 24, GaugeExecute is kept for backward compatibility. This function has been replaced with ProgressBarExecute.
Starts a long browser process and fill a Progress Bar via AJAX according to the progress of this process.
In this case, the browser process is divided in a set of small browser processes. The execution of each small process is used to fill the Progress Bar.
Remark: This function can be used in a PHP or AWP site..
Example
// Code navigateur
ProgressBarExecute(JAUGE_SansNom1, MAJ_Jauge, 0, 100, 10)
// Code navigateur de la procédure appelée par la fonction JaugeExécute
PROCEDURE MAJ_Jauge(nValeur)
// Traitement optionnel permettant de lancer un traitement serveur
AJAXExecute(TraitementServeur)
// Code navigateur
tabValeurs is array of 6 strings
tabValeurs[1] = "image1.jpg"
tabValeurs[2] = "image2.jpg"
tabValeurs[3] = "image3.jpg"
tabValeurs[4] = "image4.jpg"
tabValeurs[5] = "image5.jpg"
tabValeurs[6] = "image6.jpg"
ProgressBarExecute(JAUGE_SansNom1, MAJ_Jauge, tabValeurs)
// Code navigateur de la procédure appelée par la fonction JaugeExécute
PROCEDURE MAJ_Jauge(nValeur)
// Traitement optionnel permettant de lancer un traitement serveur
AJAXExecute(TraitementServeur)
Syntax

Modifying the Progress Bar via a procedure started on a regular basis Hide the details

ProgressBarExecute(<Progress Bar control> , <WLanguage procedure> , <Lower bound> , <Upper bound> [, <Step>])
<Progress Bar control>: Control name
Name of the Progress Bar control to use
<WLanguage procedure>: Procedure name
WLanguage procedure in browser code called for each iteration. This procedure has the following format:
PROCEDURE <Procedure name>(<Value>)

<Value> corresponds to the current position in the iteration.
<Lower bound>: Real
Minimum value transmitted to the procedure.
<Upper bound>: Real
Maximum value transmitted to the procedure.
<Step>: Optional real
Step for modifying the value between each call to the procedure. This parameter is set to 1 by default.

Modifying the Progress Bar via a procedure started for each array element Hide the details

ProgressBarExecute(<Progress Bar control> , <WLanguage procedure> , <Array>)
<Progress Bar control>: Control name
Name of the Progress Bar control to use
<WLanguage procedure>: Procedure name
WLanguage procedure in browser code called for each array element. This procedure has the following format:
PROCEDURE <Procedure name>(<Value>)

<Value> corresponds to the current array element.
<Array>: Array variable
Name of the Array variable containing the values that must be transmitted to the WLanguage procedure.
Remarks

Operating mode

In browser code, no browser process can be run in background in the context of the page. Indeed, any process locks the refresh of the browser and therefore does not allow the Progress Bar to be refreshed.
ProgressBarExecute calls a browser WLanguage procedure on a regular basis and triggers the refresh of the Progress Bar between each call.
Therefore, a long process must be divided into several steps. These steps are called one by one by the browser WLanguage procedure. If a server process must be performed, it can be started by AJAXExecute used in the code of the browser WLanguage procedure.
The function ProgressBarExecute is an asynchronous function: it starts processing and ends immediately. Therefore, when the function returns, the long process may not be ended yet.

Equivalences

The function ProgressBarExecute function is equivalent to the following codes:
First syntax:
FOR Value = <LowerBound> TO <UpperBound> STEP <Step>
<Procedure>(Value)
END
Second syntax:
FOR EACH Value OF <Array>
<Procedure>(Value)
END
Warning These codes are synchronous and therefore do not refresh the ProgressBar.
Business / UI classification: UI Code
Component: WDJS.DLL
Minimum version required
  • Version 16
Comments
Click [Add] to post a comment

Last update: 03/28/2025

Send a report | Local help