PC SOFT

ONLINE HELP
FOR WINDEV, WEBDEV AND WINDEV MOBILE

  • Overview
  • Browser code: WLanguage code or Javascript 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/iPadApple WatchUniversal Windows 10 AppWindows Mobile
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 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 the 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).
We recommend that you develop in WLanguage.
Reminder: The browser code is available in the dynamic pages and in the static pages.
Notes

Notes about the JavaScript code

  • The processes of controls and pages must contain no prototype: all you have to do is enter the requested 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:
    Versions 15 and later
    JSEndEvent
    New in version 15
    JSEndEvent
    JSEndEvent
    Deletes the association between a WLanguage browser function and an event (implemented by JSEvent).
    Versions 15 and later
    JSEvent
    New in version 15
    JSEvent
    JSEvent
    Associates a browser procedure with an event on an object in browser code.
    Versions 11 and later
    JSInfoEvent
    New in version 11
    JSInfoEvent
    JSInfoEvent
    Used to handle the JavaScript properties of the browser event that triggered the code execution.
    Versions 15 and later
    JSInterruptEvent
    New in version 15
    JSInterruptEvent
    JSInterruptEvent
    Interrupts the process of current event.
    Versions 09 and later
    JSMethod
    New in version 09
    JSMethod
    JSMethod
    Used to run a Javascript method on an element found in the current page.
    Versions 09 and later
    JSProperty
    New in version 09
    JSProperty
    JSProperty
    Used to handle specific features on the objects found in the current page.
Minimum required version
  • Version 9
Comments
Click [Add] to post a comment