AYUDA EN LÍNEA
 WINDEVWEBDEV Y WINDEV MOBILE

Este contenido se ha traducido automáticamente.  Haga clic aquí  para ver la versión en inglés.
Ayuda / WLanguage / Funciones WLanguage / Funciones específicas de la Web / Funciones varias de WEBDEV
WINDEV
WindowsLinuxJavaReports and QueriesUser code (UMC)
WEBDEV
WindowsLinuxPHPWEBDEV - Browser code
WINDEV Mobile
AndroidAndroid Widget iPhone/iPadIOS WidgetApple WatchMac Catalyst
Others
Stored procedures
JSInfoEvent (Function)
In french: JSInfoEvénement
Allows you to handle the JavaScript properties of the browser event that triggered the code execution. For example:
  • read a JavaScript property of the event.
  • assign a value to a JavaScript property of the event.
This is an advanced function, requiring a good knowledge of JavaScript.
Example
// Lecture de la position de la souris lors du clic
nPosX is int = JSInfoEvent("clientX")
Syntax

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

JSInfoEvent(<Property>)
<Property>: Character string
Property to use.
Remarks
  • 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 ...
  • In WEBDEV processes entered directly in Javascript, the function JSInfoEvent function must not be used: the Event object.
  • The JSInfoEvent function is only available in a browser code event, called directly. JSInfoEvent is not available:
    • in browser procedures.
    • in browser events called directly or indirectly from a browser procedure (via the ExecuteProcess function, for example).
Component: WDJS.DLL
Versión mínima requerida
  • Versión 11
Comentarios
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
END
Alejandro
19 04 2024

Última modificación: 27/03/2025

Señalar un error o enviar una sugerencia | Ayuda local