ONLINE HELP
 WINDEVWEBDEV AND WINDEV MOBILE

Help / WLanguage / WLanguage functions / Web-specific functions / Miscellaneous WEBDEV functions
  • JSMethod handles the aliases of the controls
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
JSMethod (Function)
In french: JSMéthode
Used to run a JavaScript method on an element found in the current page.
This function is an advanced function: a good knowledge of Javascript is required.
Example
WEBDEV - Browser code
// Element of relevant page: a flash control
// identified by its alias: "window.document." + sAlias
// JavaScript method: SetVariable
// Parameters:
// - Configurable flash area: "_root.myScroll.TXT"
// - New text: sText
JSMethod("window.document." + sAlias, "SetVariable", ...
"_root.myScroll.TXT", sText)
Syntax
JSMethod(<Full element name> , <Method> [, <Parameter 1> [... [, <Parameter N>]]])
<Full element name>: Character string
"JavaScript" name of element to use. In most cases, this name starts with "document.". You must use the aliases of controls. For more details, see Remarks.
<Method>: Character string
Method of the element to use. The name of the method must be directly specified: you cannot use a built string.
<Parameter 1>: Optional character string
Parameters of the method.
<Parameter N>: Optional character string
Parameters of the method.
Remarks

JSMethod handles the aliases of the controls

The JavaScript language is case sensitive for the identifiers: the full element name must respect the case defined for the control aliases: all page and control aliases are written in uppercase characters.
To build the name of element name, you must know the control alias. This alias corresponds to the control name in the HTML page. To find out this alias:
  • in the page editor, hover the element to display the alias used in the control tooltip.
  • in the code editor, press Shift + F1.
  • through programming, use the Alias property.
When building the full element name, you have the ability to use "_PAGE_" to access the page.
Component: WDJS.DLL
Minimum version required
  • Version 9
Comments
Click [Add] to post a comment

Last update: 05/26/2022

Send a report | Local help