PC SOFT

ONLINE HELP
FOR WINDEV, WEBDEV AND WINDEV MOBILE

Home | Sign in | English US
  • Operating mode
  • Equivalences
WINDEV
WindowsLinuxUniversal Windows 10 AppJavaReports and QueriesUser code (UMC)
WEBDEV
WindowsLinuxPHPWEBDEV - Browser code
WINDEV Mobile
AndroidAndroid Widget iPhone/iPadApple WatchUniversal Windows 10 AppWindows Mobile
Others
Stored procedures
Starts a long browser process and makes an Ajax indicator move forward 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 make the progress bar move forward.
Note: This function can be used in a PHP or AWP site.
Example
// Browser code
GaugeExecute(PROGBAR_NoName1, UPD_ProgBar, 0, 100, 10)
// Browser code of the procedure called by the GaugeExecute function
PROCEDURE UPD_ProgBar(nValue)
// Optional process used to start a server process
AJAXExecute(ServerProcess)
// Browser code
arrValues is array of 6 strings
arrValues[1] = "image1.jpg"
arrValues[2] = "image2.jpg"
arrValues[3] = "image3.jpg"
arrValues[4] = "image4.jpg"
arrValues[5] = "image5.jpg"
arrValues[6] = "image6.jpg"
GaugeExecute(PROGBAR_NoName1, UPD_ProgBar, arrValues)
// Browser code of the procedure called by the GaugeExecute function
PROCEDURE UPD_ProgBar(nValue)
// Optional process used to start a server process
AJAXExecute(ServerProcess)
Syntax

Modifying the progress bar via a procedure started on a regular basis Hide the details

GaugeExecute(<Progress Bar Control> , <WLanguage Procedure> , <Lower Bound> , <Upper Bound> [, <Step>])
<Progress Bar Control>: Character string (with or without quotes)
Progress Bar control to use.
<WLanguage Procedure>: Character string (with or without quotes)
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

GaugeExecute(<Progress Bar Control> , <WLanguage Procedure> , <Array>)
<Progress Bar Control>: Character string (with or without quotes)
Progress Bar control to use.
<WLanguage Procedure>: Character string (with or without quotes)
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 prevents from refreshing a progress bar.
GaugeExecute 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.
GaugeExecute is an asynchronous function: it starts the process and it ends immediately. Therefore, when the function returns, the long process may not be ended yet.

Equivalences

GaugeExecute 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
Caution: These code are synchronous and therefore they prevent from refreshing the progress bar.
Components
WEBDEV - Browser code WDJS.DLL
Minimum required version
  • Version 16
Comments
Click [Add] to post a comment