AYUDA EN LÍNEA
 WINDEVWEBDEV Y WINDEV MOBILE

Este contenido se ha traducido automáticamente.  Haga clic aquí  para ver la versión en inglés.
Ayuda / Desarrollar una aplicación o un sitio web / Controles, ventanas y páginas / Página
  • Overview
  • Principle
  • Implementation
  • Example
WINDEV
WindowsLinuxJavaReportes y ConsultasCódigo de Usuario (UMC)
WEBDEV
WindowsLinuxPHPWEBDEV - Código Navegador
WINDEV Mobile
AndroidWidget Android iPhone/iPadIOS WidgetApple WatchMac Catalyst
Otros
Procedimientos almacenados
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])
Versión mínima requerida
  • Versión 9
Comentarios
Haga clic en [Agregar] para publicar un comentario

Última modificación: 21/09/2024

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