ONLINE HELP
 WINDEVWEBDEV AND WINDEV MOBILE

Help / WEBDEV concepts / Part 2 - Developing a website
  • Server code or browser code?
  • Browser code: WLanguage code or JavaScript code?
  • Additional events
  • Dynamic site in PHP: Server code: WLanguage code or PHP code?
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
16. Types of code
Previous pageTable of contentsNext page
Server code or browser code?
Two types of actions can be programmed in a WEBDEV site:
To manage these two types of actions, the WEBDEV code editor differentiates two types of code:
  • Server code (yellow or pink code in the code editor): This code is written in WLanguage (yellow code) or in PHP (pink code, only available in PHP pages). This code is run on the server.
    This code is only available in dynamic pages (in Session or AWP mode).
  • Browser code (green or blue code): This code is written in WLanguage (green code) or in JavaScript (blue code).
    When the page is saved, this code is automatically converted to JavaScript and included in the WEBDEV HTML pages. This code is run locally (on the computer of the user) and requires no server action.
Browser code: WLanguage code or JavaScript code?
The code run on the end user computer (in the browser) is represented by a green or blue bar in the code editor.
  • Green header = WLanguage: the WL symbol is displayed on the code header.
  • Blue bar = JavaScript: the JS symbol is displayed on the code header.
To switch from green code (WLanguage) to blue code (JavaScript), simply click the WL symbol on the code header. Conversely, click JS to switch to WLanguage. When the page is saved, the WLanguage code is automatically converted to JavaScript.
We recommend that you develop in WLanguage.
Additional events
The link "Add other events" in the code window is used to manage events in addition to those proposed by default. Simply click on "Add other events to xxx" at the bottom of the code window: the list of additional events is displayed.
Simply select the desired events to add them to the codes displayed by the code editor.
Example of additional events: double-click, key down, key pressed, key released, button pressed, mouse moved, etc.
Reminder: Browser code is available in dynamic (Session or AWP mode) and static pages.
Dynamic site in PHP: Server code: WLanguage code or PHP code?
The code run on the server is represented by a Yellow or Pink bar in the code editor.
  • Yellow bar = WLanguage: the WL symbol is displayed on the code header.
  • Pink bar = PHP: the PHP symbol is displayed on the code header.
To switch from yellow code (WLanguage) to pink code (PHP), simply click the WL symbol in the code header. Conversely, click PHP to switch to WLanguage. When the PHP page is saved, the WLanguage code is automatically converted to PHP.
We recommend that you develop in WLanguage.
Previous pageTable of contentsNext page
Comments
Click [Add] to post a comment

Last update: 08/25/2023

Send a report | Local help