PC SOFT

ONLINE HELP
FOR WINDEV, WEBDEV AND WINDEV MOBILE

Home | Sign in | English US
  • Parameters of jQuery function
  • Loading the jQuery libraries
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
jQueryExecute (Function)
In French: jQueryExécute
Runs a Javascript method of the jQuery library on a page element.
Notes:
  • jQuery is used to run several chained methods.
  • This function is an advanced feature: a good knowledge of Javascript and jQuery library is required
Example
// The CELL_Square control explodes before it disappears
jQueryExecute(CELL_Square,"effect","explode")

// Modify the opacity of the STC_1 control
jQueryExecute(STC_1, "fadeTo", "opacity", 0.5)
Syntax
<Result> = jQueryExecute(<Control Name> [, <Category>] , <jQuery Function> [, <Parameter 1> [, ... <Parameter N>]])
<Result>: Expected type
Return value of jQuery method called.
<Control Name>: Character string (with or without quotes)
Name of control that will be used in the page.
Note: The option "The control can be overlaid" must be checked for the control ("GUI" tab in the description window of the control).
<Category>: Optional character string (with quotes)
Name of the category of functions in the jQuery library.
<jQuery Function>: Character string (with quotes)
Name of jQuery function to run.
Caution: Javascript being case sensitive, the function name must respect the case used in the jQuery library.
<Parameter 1>: Optional character string (with or without quotes)
First parameter expected by the jQuery function.
<Parameter N>: Optional character string (with or without quotes)
Nth parameter expected by the jQuery function.
Remarks

Parameters of jQuery function

If a procedure (also called "Callback") must be passed in parameter to the jQuery function, the browser procedure must be passed by address (name of the function preceded by "&"). For example:
jQueryExecute(BTN_Addition, "click", &OnAddition)

Loading the jQuery libraries

Several versions are available for the jQuery library. Several Javascript files can be found in the jQuery library.
Therefore, the additional Javascript libraries must be loaded. Two methods are available:
  • include the Javascript load code in the header code of the page.
  • download the Javascript jQuery libraries on the server and include the Javascript files in your project or page.
Method 1: To include the load code in the page:
  1. Display the description window of the page ("Description" from the popup menu).
  2. Select the "Advanced" tab.
  3. Select the "HTML" tab.
  4. Copy the following code lines into the "HTML code added to the page header" area:
<script src="http://code.jquery.com/jquery-1.9.1.js"></script>
<script src="http://code.jquery.com/ui/1.10.3/jquery-ui.js"></script>
Caution: When this help page was written, the libraries were available in version 1.9.1 and 1.10.3. We advise you to check whether these versions are still the current ones.
Method 2: To include the Javascript files in your page (after download):
  1. Display the description window of the page ("Description" from the popup menu).
  2. Select the "Advanced" tab.
  3. Select the "HTML" tab.
  4. Click the "Add" button and select the necessary Javascript files (.js). Caution: we advise you to check which versions are the current ones.
Components
WEBDEV - Browser code WDJS.DLL
Minimum required version
  • Version 19
Comments
Click [Add] to post a comment