PC SOFT

ONLINE HELP
 WINDEVWEBDEV AND WINDEV MOBILE

Home | Sign in | English EN
This content has been translated automatically. Click here to view the French version.
  • 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:
// - 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:
  • under the page editor, hover over the item to display the alias used in the Control tooltip.
  • in the code editor, press Shift + F1.
  • by 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