AYUDA EN LÍNEA
 WINDEVWEBDEV Y WINDEV MOBILE

Ayuda / Desarrollar una aplicación o un sitio web / Controles, ventanas y páginas / Página
  • Overview
  • Principle
  • Implementation
  • Example
WINDEV
WindowsLinuxUniversal Windows 10 AppJavaReports and QueriesUser code (UMC)
WEBDEV
WindowsLinuxPHPWEBDEV - Browser code
WINDEV Mobile
AndroidAndroid Widget iPhone/iPadIOS WidgetApple WatchMac CatalystUniversal Windows 10 App
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, Combo Box, Check Box control, etc.):
  1. Create a new button in the page: this dynamic button can have any type, it can be 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:
// -- Initialization of LIST_CONTINENT
ListAdd(LIST_CONTINENT, "Africa" + CR + "America" + CR + "Asia" + CR + "Europe" + CR + ...
"Oceania")
 
// -- Modification and exit (onchange) from LIST_CONTINENT
// Validates the page and starts running the server click code of BTN_Button1
PageSubmit("", BTN_Button1)
Code of BTN_Button1:
// -- Click on BTN_Bouton1 (server code)
Info("Selection: " + LIST_CONTINENT[LIST_CONTINENT])
Versión mínima requerida
  • Versión 9
Comentarios
Haga clic en [Agregar] para publicar un comentario

Última modificación: 12/06/2023

Señalar un error o enviar una sugerencia | Ayuda local