ONLINE HELP
 WINDEVWEBDEV AND WINDEV MOBILE

Help / WEBDEV concepts / Part 2 - Developing a website
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
18. Order of execution of the code of buttons/links
Previous pageTable of contentsNext page
Two click codes are available for buttons/links:
  • a browser click code, which can be written in WLanguage (or JavaScript) in the code editor. This code is included in the HTML page and is executed on the user's computer.
  • a server click code, which can be written in WLanguage (only in dynamic pages). This code is executed on the server.
The table below presents the different codes run (according to the type of button/link) and the associated action.
The appearance and target of the button/link do not affect the order in which the codes are executed.
Tip: Think as the user would to understand and remember the order in which the server and browser codes are executed: the user clicks the button in the browser, therefore the browser click must be executed first.
ActionOrder of executionRemarks
Send values to the server (submit)Associated action:
  • Execute browser codes only
  • Run server and browser codes
Code executed:
  1. Browser click code of the control.
  2. Browser code of the page submit (if it exists).
  3. Code to send values from the controls in the page to update the page context on the server.
  4. Server code of the control (if necessary).
Page context automatically updated on the server (Session or AWP dynamic pages only).
Associated action: Display a page of the site
Code executed:
  1. Browser click code of the control.
  2. Browser code of the page submit (if it exists).
  3. Code to send values from the controls in the page to update the page context on the server.
  4. Server code of the control.
  5. Page display.
Page context automatically updated on the server (Session or AWP dynamic pages only).
Automatic page display.
Reset the page contentAssociated action: Execute browser codes only
Code executed:
  1. Browser click code of the control.
  2. Code to display the initial page (page with all controls empty or with their default values and execution of the initialization code for each control, and then for the page).
Don't send anything to the serverAssociated action: Execute browser codes only
Code executed:
Browser code of the control only.
Associated action: Run server and browser codes
Code executed:
  1. Browser click code of the control.
  2. Server code of the control.
Associated action: Display a page of the site
Code executed:
  1. Browser click code of the control.
  2. Server code of the control.
  3. Page display.
Automatic page display
Previous pageTable of contentsNext page
Comments
Click [Add] to post a comment

Last update: 08/25/2023

Send a report | Local help