ONLINE HELP
 WINDEVWEBDEV AND WINDEV MOBILE

Help / Developing an application or website / Controls, windows and pages / Controls: Available types / Button control
  • Overview
  • The different available choices
  • Remark: Internet browsers only allow a single action on the page per process
  • Choosing a type of button
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
Choose the action of the button in a page
Overview
When defining the action of a button in a page, a button can perform different operations depending on the type of the action selected.
The different available choices
The operation performed during the action is chosen in the button description window ("General" tab).
The possible operations during the action are:
  • Send values to the server (submit):
    The button validates all the controls in the current page and returns the value of the controls to the server. Then, the server performs the specified action.
  • Do not send anything to the server:
    The button performs the requested action but it does not return the content of the controls found in the current page to the server.
  • Delete content of the controls in the browser (reset) - for compatibility:
    The button clears all the page controls (except for the controls initialized through programming).

Remark: Internet browsers only allow a single action on the page per process

Some types of buttons automatically trigger an action on the page ("Send the value of controls to the server (submit)").
This function will be ignored if PageSubmit or EmailOpenMail are used in the "Click" browser event of these buttons (or in a procedure called by this event): only the action of the button will be performed.
Consequences: PageSubmit or EmailOpenMail cannot be used in a code that triggers an action (automatically or not). These functions are ignored:
  • in the click code of a button that performs the action "Send values to the server (submit)".
  • in the click code of a button that performs an action different from "Do not send anything to the server".
  • if PageSubmit is followed by EmailOpenMail (in the current event, in a procedure called by the current event or in another process called by Execute).
  • if EmailOpenMail is followed by PageSubmit (in the current event, in a procedure called by the current event or in another process called by Execute).
To use PageSubmit or EmailOpenMail from a button ("Click" browser event of the button), this button must have the following characteristics ("General" tab in the description window):
  • Operation on the controls: "Run browser click code only".
  • Action: "Do not send anything to the server".
Choosing a type of button
Let's see some "standard" examples for using buttons in a page:
Action to performExampleOperation available with the action
Send data of the current page to the server to be processedRegistration form
The button checks whether the entered information is correct and displays a confirmation page.
Send value of controls to server (submit)
Perform a process on the server, without retrieving the data of the current pageMenu page with buttons.
Each button is used to display a page of the site
None
Perform a process in browser codePerform a simple calculation, an input check, ...None
Display a static page of the siteDisplay the home page of the siteNone
Display a page external to the siteStart a search engineNone
Reset the page controlsClear the controls of the current pageReset page controls
Minimum version required
  • Version 9
Comments
Click [Add] to post a comment

Last update: 06/02/2022

Send a report | Local help