ONLINE HELP
 WINDEVWEBDEV AND WINDEV MOBILE

This content has been translated automatically.  Click here  to view the French version.
Help / WLanguage / WLanguage functions / Web-specific functions / Miscellaneous WEBDEV functions
  • Miscellaneous
  • Encoding parameters
WINDEV
WindowsLinuxJavaReports and QueriesUser code (UMC)
WEBDEV
WindowsLinuxPHPWEBDEV - Browser code
WINDEV Mobile
AndroidAndroid Widget iPhone/iPadIOS WidgetApple WatchMac Catalyst
Others
Stored procedures
Calls an external script (.asp or .php) and returns the result in a string. An http request is sent: you can use either a POST method or a GET method.
Example
// Exécute le script "Script1.php" situé à la racine du site Web 
// et renvoie le résultat dans MonBuffer
MonBuffer is Buffer
MonBuffer = ScriptExecute("/Script1.php")
// Page de login en asp. Envoie 3 paramètres avec la méthode POST
MonBuffer is Buffer
MonBuffer = ScriptExecute("/ASP/Login.asp", ...
	"Name=BOB&Pass=Mon+Secret&Lang=3", True)
// Récupération de la "home" page du site "serveur2"
MonBuffer is Buffer
MonBuffer = ScriptExecute("http://www.serveur2.csom/default.htm")
LIBHTM_LibelléHTML = MonBuffer
Syntax
<Result> = ScriptExecute(<Script name> [, <"Name1=Param1&Name2=Param2&..."> [, <Runtime method>]])
<Result>: Buffer or character string
Result of ASP script. In most cases, this result can be displayed by StringDisplay.
<Script name>: Character string
Address of the script. The script URL can have the following format:
  • "http://NomDeServeur/Adresse.asp": the Adresse.asp script is located on the "ServerName" machine
  • "/Scripts/MonScript.php": The MonScript.php script is located on the current server, in the "/Scripts" subdirectory of the site.
  • you have the ability to use a secure address (https)
<"Name1=Param1&Name2=Param2&...">: Optional character string
Parameters intended for the script. This string contains for each parameter:
  • the parameter name,
  • the sign'=',
  • the parameter value.
Two parameters are separated by the sign'&'.
<Runtime method>: Optional boolean
  • True to run a POST method,
  • False (default) to run a GET method.
Remarks

Miscellaneous

ScriptExecute is slower than ScriptDisplay.

Encoding parameters

The content of parameters is automatically encoded to get a valid URL:
  • transformation into UTF-8 (according to the options of the page and project)
  • encoding of special characters
Component: wd300page.dll
Minimum version required
  • Version 9
Comments
Click [Add] to post a comment

Last update: 09/11/2024

Send a report | Local help