Help / WLanguage / WLanguage functions / Web-specific functions / Miscellaneous WEBDEV functions
WindowsLinuxUniversal Windows 10 AppJavaReports and QueriesUser code (UMC)
WindowsLinuxPHPWEBDEV - Browser code
AndroidAndroid Widget iPhone/iPadIOS WidgetApple WatchMac CatalystUniversal Windows 10 App
Stored procedures
JSInfoEvent (Function)
In french: JSInfoEvénement
Allows you to handle the JavaScript properties of the browser event that triggered the code execution. Allows you to:
  • read a JavaScript property of the event.
  • assign a value to a JavaScript property of the event.
This function is an advanced function: a good knowledge of Javascript is required.
// Read the position of the mouse during a click
nXPos is int = JSInfoEvent("customerX")

Retrieving the value of an event property Hide the details

<Result> = JSInfoEvent([<Property>])
<Result>: Variant
Property value.
<Property>: Optional character string
Property to use. If this parameter is not specified, JSInfoEvent retrieves the object directly. JSInfoEvent can be used as an argument of a browser procedure written in JavaScript.

Modifying a property of the event Hide the details

<Property>: Character string
Property to use.
  • The "event" objects differ according to the browsers. Some properties are not available for all browsers.
  • The event that triggered the execution of the code may not be available. Before using this event, we recommend that you check its existence with the following line of code for example:
    IF JSInfoEvent() THEN ...
  • JSInfoEvent must not be used in WEBDEV processes directly entered in JavaScript: use the Event object directly.
  • JSInfoEvent is not available:
    • in browser procedures.
    • in the events directly or indirectly called from a browser procedure (via ExecuteProcess for example).
Component: WDJS.DLL
Minimum version required
  • Version 11
Capture carriage return key code
keyCode is int = JSInfoEvent("keyCode")

// 13 es equivalente al retorno de carro en codigo ASCII
IF keyCode = 13 THEN
// If enter key was pressed execute this
19 Apr. 2024

Last update: 05/26/2022

Send a report | Local help