PC SOFT

WINDEVWEBDEV AND WINDEV MOBILE
ONLINE HELP

Home | Sign in | English UK
  • 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/iPadApple WatchUniversal Windows 10 AppWindows Mobile
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:
// - Customizable 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. See Remarks for more details.
<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.
  • by programming, use ..Alias.
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