ONLINE HELP
 WINDEVWEBDEV AND WINDEV MOBILE

Help / Editors / Code editor
  • Overview
  • Browser code: WLanguage code or JavaScript/TypeScript code?
  • Notes
  • Notes about the JavaScript 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
Overview
WEBDEV allows you to create static pages and dynamic pages. Two types of actions can be programmed in a WEBDEV site:
To manage these two types of actions, the code editor of WEBDEV differentiates between two types of code:
  • Server code (Yellow code in the code editor)
    This code is written in WLanguage. This code is run on the server.
    This code is only available in dynamic pages.
  • Browser code (green or blue code)
    This code is written in WLanguage (green) or in JavaScript/TypeScript (blue).
    When the page is saved, the WLanguage 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/TypeScript code?
In the code editor, the code executed in the user's browser is represented by a green or blue header.
  • Green header = WLanguage: the WL symbol is displayed on the code header.
  • Blue header = JavaScript / TypeScript:
    • JavaScript code: the JS symbol is displayed on the code header.
    • TypeScript code: the TS symbol is displayed on the code header.
To switch from green code (WLanguage) to blue code (JavaScript or TypeScript), simply:
  • click the WL symbol in the code header.
  • choose the desired language (JavaScript or TypeScript).
We recommend that you develop in WLanguage.
Reminder: Browser code is available in both dynamic and static pages.
Notes

Notes about the JavaScript code

  • The processes of controls and pages must contain no prototype: simply write the desired JavaScript code
  • The procedures of pages must contain the prototype and the braces required by the JavaScript code
  • The procedures of supercontrols must contain the prototype and the braces required the JavaScript code.
    Furthermore, the name of the generated JavaScript function must be prefixed by the alias of the supercontrol.
  • The accesses to the controls must be done via their aliases.
  • "_PAGE_" is used to access the form containing the controls of the current page
  • Several WLanguage functions can be used to handle the properties and the methods of JavaScript objects in browser code:
    JSEndEventDeletes the association between a WLanguage browser function and an event (implemented by JSEvent).
    JSEventAssociates a browser procedure with an event on an object in browser code.
    JSInfoEventUsed to handle the JavaScript properties of the browser event that triggered the code execution.
    JSInterruptEventInterrupts the process of current event.
    JSMethodUsed to run a JavaScript method on an element found in the current page.
    JSPropertyUsed to handle specific features on the objects found in the current page.
Minimum version required
  • Version 9
Comments
Click [Add] to post a comment

Last update: 03/31/2023

Send a report | Local help