PC SOFT

ONLINE HELP
FOR WINDEV, WEBDEV AND WINDEV MOBILE

Home | Sign in | English US
  • Processes managed by default
  • Optional processes
  • Optional processes for managing the disconnected mode
  • Optional process for managing the navigation history
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
Processes managed by default
WEBDEV - Server codeWEBDEV - Browser codeWindowsLinux WEBDEV manages the following processes by default (in the order in which they appear in the code editor):
ProcessRuntime condition
Declaration of global variables (Server code)Declaring the variables global to the page. This is the first code run when opening the page.
Initialization (Server code)Run when opening the page.
The processes are run in the following order:
  • Initializing the page controls
  • Initializing the page
Loading (onload) the page (Browser code)Browser code run when the page is displayed in the browser (performed by PageDisplay or PageRefresh for example)
Unloading (onunload) the page (Browser code)Browser code run when a new page is displayed in the browser.
Versions 19 and later
Refreshing the page data (Server code)
New in version 19
Refreshing the page data (Server code)
Refreshing the page data (Server code)
Process available only if the automatic data refresh was defined for the page (see Refreshing the page data). This process is run when refreshing the page. It is used for example to update the requested controls: filling a list, ... This process is an Ajax process.
If this process returns False, the "After refreshing the page data (Browser code)" process is not run.
Versions 19 and later
After refreshing the page data (Browser code)
New in version 19
After refreshing the page data (Browser code)
After refreshing the page data (Browser code)
Process available only if the automatic data refresh was defined for the page (see Refreshing the page data).
This process is run after the server process for refreshing the page. It is used to perform an additional process on the browser. If the "Refreshing the page data (Server code)" process returns False, the "After refreshing the page data (Browser code)" process is not run.
Closing the page (Server code)Run when closing the page.
Synchronizing the page (Server code)Server code used to manage the synchronization of the page when using the browser "Back" key. See Managing the browser "Back" key for more details.

Note: Only the browser codes are available in a static page.
PHP In PHP, the following WLanguage processes are associated with a page:
ProcessRuntime condition
Declaration of global variables (Server code)Declaring the variables global to the page. This is the first code run when opening the page.
Initialization (Server code)Case 1: Page with context:
Run once during the first display of the page to initialize the context.
The processes are run in the following order:
  • Initializing the page controls
  • Initializing the page
Case 2: Page without context:
Run whenever the page is displayed. Used to run a process whenever the server redisplays the page (a process used to check whether the Web user is identified by his login for example).
The processes are run in the following order:
  • Initializing the page controls
  • Initializing the page
1st display of the page (Server code)For the PHP pages without context
Run once during the first display of the page.
The processes are run in the following order:
  • Initializing the page controls
  • Initializing the page
Versions 16 and later
Whenever the page is displayed (Server code)
New in version 16
Whenever the page is displayed (Server code)
Whenever the page is displayed (Server code)
For the PHP pages with context
Run whenever the page is displayed. Used to run a process whenever the server redisplays the page (a process used to check whether the Web user is identified by his login for example).
Reminder: The initialization process of the page is run once, during the first display of the page to initialize the context.
For an Ajax page, this process is run for each request made to the server.
Loading (onload) the page (Browser code)Browser code run when the page is displayed in the browser (performed by PageDisplay or PageRefresh for example)
Unloading (onunload) the page (Browser code)Browser code run when a new page is displayed in the browser.

For example, in a PHP page without context:
  • During the initialization, a Combo Box control that lists the titles is filled with "Madam"+ CR + "Mister".
  • During the first display, the default title is selected ("Mister").
For example, in a PHP page with context:
  • During the initialization, a Combo Box control that lists the titles is filled with "Madam"+ CR + "Mister" and the default title is selected ("Mister").
  • During each display, a test about the consistency of control or about the consistency of control update is run (counter of visits, ...).
Related Examples:
WW_Forum_PHP Complete examples (WEBDEV): WW_Forum_PHP
[ + ] This example proposes the main features of a user forum (creation of forums, topics and messages, moderator, search, etc.)

Some of the features used by WW_FORUM_PHP:
- Rich control
- AJAX
-...
WW_Blogs_php Complete examples (WEBDEV): WW_Blogs_php
[ + ] This example is a PHP site created with WEBDEV for managing blogs.
A blog is a log or a diary on an Internet site.
It can be consulted by everyone and everyone can write his own comments.
The author of the blog writes messages whenever he wants to.
You have the ability to format the text, to include images, notes, and so on.
Furthermore, each blog can be exported in RSS.
Optional processes
Several optional processes can be managed.
To manage an optional process, all you have to do is select it in the icon bar of code window.
To add an optional process:
  1. Select the requested control.
  2. Display the code window of this control ([F2] key).
  3. Click the link "Add other processes to xxx" found at the end of window code, after the last process.
  4. All the optional processes available for the control are displayed.
  5. Check the optional process to add and validate.
    Note: You have the ability to select several optional processes.
  6. The selected optional process is automatically added into the processes managed by the control
To disable an optional process, perform the same operations to display the list of optional processes. Then, all you have to do is uncheck the optional processes to delete.
Note: If the disabled code contains WLanguage code, this code is automatically deleted.
You have the ability to manage:
  • the left mouse button down, up, with a double click,
  • the right mouse button down, up, with double click, ...
See the Optional processes for more details.
Versions 16 and later

Optional processes for managing the disconnected mode

Several optional processes can be used to optimize the management of the offline sites:
ProcessRuntime condition
Switch to off-line mode (Browser code)Process run when switching to off-line mode.
Switch to on-line mode (Browser code)Process run when switching to on-line mode.
Whenever the status of the HTML cache changes (Browser code)This process is used to check what happens when the page is loaded. This process is called whenever the cache is checked.
The following command line is used to retrieve the actions performed by the browser:
Trace(JSInfoEvent("type"))
You have the ability to find out:
  • whether the browser is currently updating the cache,
  • whether an error occurs
  • whether the update of the cache is completed
  • whether no update must be performed, ....
New in version 16

Optional processes for managing the disconnected mode

Several optional processes can be used to optimize the management of the offline sites:
ProcessRuntime condition
Switch to off-line mode (Browser code)Process run when switching to off-line mode.
Switch to on-line mode (Browser code)Process run when switching to on-line mode.
Whenever the status of the HTML cache changes (Browser code)This process is used to check what happens when the page is loaded. This process is called whenever the cache is checked.
The following command line is used to retrieve the actions performed by the browser:
Trace(JSInfoEvent("type"))
You have the ability to find out:
  • whether the browser is currently updating the cache,
  • whether an error occurs
  • whether the update of the cache is completed
  • whether no update must be performed, ....

Optional processes for managing the disconnected mode

Several optional processes can be used to optimize the management of the offline sites:
ProcessRuntime condition
Switch to off-line mode (Browser code)Process run when switching to off-line mode.
Switch to on-line mode (Browser code)Process run when switching to on-line mode.
Whenever the status of the HTML cache changes (Browser code)This process is used to check what happens when the page is loaded. This process is called whenever the cache is checked.
The following command line is used to retrieve the actions performed by the browser:
Trace(JSInfoEvent("type"))
You have the ability to find out:
  • whether the browser is currently updating the cache,
  • whether an error occurs
  • whether the update of the cache is completed
  • whether no update must be performed, ....
Versions 23 and later

Optional process for managing the navigation history

A specific optional process is available for optimizing the management of Previous/Next keys.: "Move into the navigation history (onpopstate)".
This process expects the data to display in parameter. This data was stored in the history by BrowserHistoryAdd and BrowserHistoryModify.
If the Web user goes back into the history and if he returns on an entry stored in the history, the stored data will be transmitted to the "Move in the navigation history" process (optional page process). This process must process the data in order to restore the page status. This process must be associated with a procedure that expects the transmitted data in parameter:
// "Move in the navigation history (onpopstate)" process
PROCEDURE <ProcedureName>(<Data>)
Example: This example adds the page into the history and stores the insertion time. Going back to the previous history page displays the time.
x is Variant
x.Time = TimeSys()
BrowserHistoryAdd(x, MyPage..Title, "#before")

x.Time = TimeSys()
BrowserHistoryAdd(x, MyPage..Title, "#after")
// "Move in the navigation history (onpopstate)" process
PROCEDURE ProcessHistory(stStatus)
Info(stStatus.Time)
Note: Depending on the browsers, the "Move in the navigation history (onpopstate)" process is also run when loading the page and when going back to the initial page display. In this case, the <Data> parameter transmitted to the process corresponds to Null.
New in version 23

Optional process for managing the navigation history

A specific optional process is available for optimizing the management of Previous/Next keys.: "Move into the navigation history (onpopstate)".
This process expects the data to display in parameter. This data was stored in the history by BrowserHistoryAdd and BrowserHistoryModify.
If the Web user goes back into the history and if he returns on an entry stored in the history, the stored data will be transmitted to the "Move in the navigation history" process (optional page process). This process must process the data in order to restore the page status. This process must be associated with a procedure that expects the transmitted data in parameter:
// "Move in the navigation history (onpopstate)" process
PROCEDURE <ProcedureName>(<Data>)
Example: This example adds the page into the history and stores the insertion time. Going back to the previous history page displays the time.
x is Variant
x.Time = TimeSys()
BrowserHistoryAdd(x, MyPage..Title, "#before")

x.Time = TimeSys()
BrowserHistoryAdd(x, MyPage..Title, "#after")
// "Move in the navigation history (onpopstate)" process
PROCEDURE ProcessHistory(stStatus)
Info(stStatus.Time)
Note: Depending on the browsers, the "Move in the navigation history (onpopstate)" process is also run when loading the page and when going back to the initial page display. In this case, the <Data> parameter transmitted to the process corresponds to Null.

Optional process for managing the navigation history

A specific optional process is available for optimizing the management of Previous/Next keys.: "Move into the navigation history (onpopstate)".
This process expects the data to display in parameter. This data was stored in the history by BrowserHistoryAdd and BrowserHistoryModify.
If the Web user goes back into the history and if he returns on an entry stored in the history, the stored data will be transmitted to the "Move in the navigation history" process (optional page process). This process must process the data in order to restore the page status. This process must be associated with a procedure that expects the transmitted data in parameter:
// "Move in the navigation history (onpopstate)" process
PROCEDURE <ProcedureName>(<Data>)
Example: This example adds the page into the history and stores the insertion time. Going back to the previous history page displays the time.
x is Variant
x.Time = TimeSys()
BrowserHistoryAdd(x, MyPage..Title, "#before")

x.Time = TimeSys()
BrowserHistoryAdd(x, MyPage..Title, "#after")
// "Move in the navigation history (onpopstate)" process
PROCEDURE ProcessHistory(stStatus)
Info(stStatus.Time)
Note: Depending on the browsers, the "Move in the navigation history (onpopstate)" process is also run when loading the page and when going back to the initial page display. In this case, the <Data> parameter transmitted to the process corresponds to Null.
Minimum required version
  • Version 10
Comments
Click [Add] to post a comment