PC SOFT

WINDEVWEBDEV AND WINDEV MOBILE
ONLINE HELP

Home | Sign in | English UK
  • 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/iPadApple WatchUniversal Windows 10 AppWindows Mobile
Others
Stored procedures
16. The two 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 available in the dynamic pages only.
  • Browser code (green or blue code): This code is written in WLanguage (green code) or in Javascript (blue code).
    When saving the page, this code is automatically translated into Javascript and included in the WEBDEV HTML pages. This code is run locally (on the computer of Web user) and it requires no server action.
Browser code: WLanguage code or Javascript code?
The code run on the computer of Web user (in the browser) is represented by a green bar or by a blue bar in the code editor.
  • Green bar = WLanguage: the WL symbol is displayed in front of the code.
  • Blue bar = Javascript: the JS symbol is displayed in front of the code.
To switch from a green code (WLanguage) to a blue code (Javascript), all you have to do is click the WL symbol found in front of the code caption (and conversely by clicking JS). When the page is saved, the WLanguage code is automatically converted into Javascript.
We recommend that you develop in WLanguage.
Additional events
The link "Add other processes" in the code window is used to manage events in addition to those proposed by default. Simply click on "Add other processes to xxx" at the bottom of the code window: the list of additional events is displayed. 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.
All you have to do is select the requested events to add them to the codes displayed by the code editor.
Example of additional events: double-click, key down, key pressed, key up, button down, mouse moved, ...
Reminder: Browser code is available in dynamic and static pages.
Dynamic site in PHP: Server code: WLanguage code or PHP code?
The codes run on the server are represented by a Yellow or Pink bar in the code editor.
  • Yellow bar = WLanguage: the WL symbol is displayed in front of the code.
  • Pink bar = PHP: the PHP symbol is displayed in front of the code.
To switch from yellow code (WLanguage) to pink code (PHP), all you have to do is click the WL symbol found in front of the code (and conversely by clicking PHP). When saving the PHP page, the WLanguage code is automatically converted into PHP code.
We recommend that you develop in WLanguage.
Previous pageTable of contentsNext page
Minimum version required
  • Version 23
Comments
Click [Add] to post a comment