ONLINE HELP
 WINDEVWEBDEV AND WINDEV MOBILE

This content has been translated automatically.  Click here  to view the French version.
Help / Developing an application or website / Controls, windows and pages / Page
  • Overview
  • Principle
  • Implementation
  • Example
WINDEV
WindowsLinuxJavaReports and QueriesUser code (UMC)
WEBDEV
WindowsLinuxPHPWEBDEV - Browser code
WINDEV Mobile
AndroidAndroid Widget iPhone/iPadIOS WidgetApple WatchMac Catalyst
Others
Stored procedures
Validating a page from a control that has no action on the server (List Box control, Combo Box, etc.)
Overview
By default, the validation of a page must be performed by a "Send the values of controls to the server (submit)" button.
To validate a page when selecting an element in a List Box, Combo Box, Check Box or Radio Button control, use PageSubmit.
Principle
PageSubmit is used to validate a page via a visible or hidden button whose server click code is run. The following events are run when PageSubmit is called:
  • Sending the data to the server.
  • Server click code of button.
Implementation
To validate a page from a control without action (List Box control, Combo Box control, Check Box control, ...):
  1. Create a new button in the page: this dynamic button can be of any type, visible or not. This button is used to start the validation of the page. Only the server click code of this button will be run.
  2. In the modification code of the control without action, use PageSubmit and specify:
    • the page to validate if necessary.
    • the name of the button used for the validation (created in step 1).
    • the frame containing the result of the button action (for a frameset for example).
Example
Selecting an element in the List Box control named LIST_CONTINENT is used to display the selected element in a dialog box.
The code of the List Box control is as follows:
// -- Initialisation du champ LISTE_CONTINENT
ListAdd(LISTE_CONTINENT, "Afrique" + CR + "Amérique" + CR + "Asie" + CR + "Europe" + CR + ...
				"Océanie")

// -- Modification et sortie (onchange) du champ LISTE_CONTINENT
// Valide la page et lance l'exécution du code de clic serveur de BTN_Bouton1
PageSubmit("", BTN_Bouton1)
Code of BTN_Button1:
// -- Clic sur BTN_Bouton1 (code serveur)
Info("Sélection: " + LISTE_CONTINENT[LISTE_CONTINENT])
Minimum version required
  • Version 9
Comments
Click [Add] to post a comment

Last update: 09/21/2024

Send a report | Local help