|
|
|
|
|
18. Order of execution of the code of buttons/links
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: To remember the order in which server and browser codes are executed, simply keep in mind that users click on a button displayed on their browsers. Therefore, the click code on the browser side is executed first. | | | Action | Order of execution | Remarks |
---|
Send values to the server (submit) | Associated action:- Execute browser codes only
- Run server and browser codes
Code executed: - Browser click code of the control.
- Browser code of the page submit (if it exists).
- Code to send values from the controls in the page to update the page context on the server.
- 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: - Browser click code of the control.
- Browser code of the page submit (if it exists).
- Code to send values from the controls in the page to update the page context on the server.
- Server code of the control.
- Page display.
| Page context automatically updated on the server (Session or AWP dynamic pages only). Automatic page display. | Reset the page content | Associated action: Execute browser code only Code executed: - Browser click code of the control.
- 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 server | Associated action: Execute browser code only Code executed: Browser code of the control only. | | | Associated action: Execute server and browser code Code executed: - Browser click code of the control.
- Server code of the control.
| | | Associated action: Display a page of the site Code executed: - Browser click code of the control.
- Server code of the control.
- Page display.
| Automatic page display |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|