PC SOFT

ONLINE HELP
FOR WINDEV, WEBDEV AND WINDEV MOBILE

Home | Sign in | English US
  • 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 the 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 the Notes 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 name of the element must comply with the case defined for the control aliases: all the page and control aliases are written in uppercase characters.
To build the name of the element, you must know the alias of the control. This alias corresponds to the name of the control 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 name of the element, you have the ability to use "_PAGE_" to access the page.
Components
WEBDEV - Browser code WDJS.DLL
Minimum required version
  • Version 9
Comments
Click [Add] to post a comment