ONLINE HELP
 WINDEVWEBDEV AND WINDEV MOBILE

This content has been translated automatically.  Click here  to view the French version.
Help / WEBDEV concepts / Part 2 - Developing a website
  • Server code or browser code?
  • Browser code: WLanguage code or JavaScript code?
  • Additional events
  • Dynamic PHP site: Server code: WLanguage or PHP?
WINDEV
WindowsLinuxJavaReports and QueriesUser code (UMC)
WEBDEV
WindowsLinuxPHPWEBDEV - Browser code
WINDEV Mobile
AndroidAndroid Widget iPhone/iPadIOS WidgetApple WatchMac Catalyst
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 website:
To manage these two types of actions, the WEBDEV code editor differentiates between two types of code:
  • Server code (yellow or pink headers in the code editor): This code is written in WLanguage (yellow header) or in PHP (pink header, available for PHP pages only). 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 headers): This code is written in WLanguage (green header) or JavaScript (blue header).
    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?
Code executed on the user's computer (browser) is identified by a green or blue header in the code editor.
  • Green header = WLanguage: A "WL" symbol is shown in the code header.
  • Blue header = JavaScript: A "JS" symbol is shown in 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 "Add other events" link in the code window allows you to use events other than those available by default. Click "Add other events to xxx" at the bottom of the code window to view the list of additional events.
Simply select the desired events and they will be added to the code displayed in the code editor.
Some examples of additional events include double-click, key pressed, key released, button pressed, etc.
<>Reminder: Browser code is available in dynamic (Session or AWP mode) and static pages.
Dynamic PHP site: Server code: WLanguage or PHP?
Code executed on the server side are identified by a yellow or pink header in the code editor.
  • Yellow header = WLanguage. A "WL" symbol is shown in the code header.
  • Pink header = PHP: A "PHP" symbol is shown in 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: 10/02/2024

Send a report | Local help