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
  • Displaying other files
  • Encoding the parameters of ScriptDisplay
  • Pre-launched sessions
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 or page (.php, .asp, .mhtml or.mht) and returns the result page in the current browser window.
Example
// Exécute le script "Script1.php" situé à la racine du site Web
// et renvoie le résultat à l'internaute
ScriptDisplay("/Script1.php")
// Retour à la page d'initialisation ASP du site
ScriptDisplay("/localstart.asp")
// Page de login en asp. Envoie 3 paramètres avec la méthode GET
ScriptDisplay("/ASP/Login.asp", "Name=BOB&Pass=Mon+Secret&Lang=3")
// Affiche un site externe
ScriptDisplay("http://www.pcsoft.fr/")
Syntax
ScriptDisplay(<Script name> [, <"Name1=Param1&Name2=Param2&..."> [, <Redirection>]])
<Script name>: Character string
Path and name of the script. The path can be:
  • a full URL "http://..."
  • a path relative to the root of the site "/...". In this case, the script and the Web site must be found on the same server, in one of the site sub-directories.
<"Name1=Param1&Name2=Param2&...">: Character string
Parameters intended for the script. This string contains for each parameter:
  • the name of the parameter ("Name1" for example).
  • the sign'='.
  • the value of the parameter ("Param1" for example).
Two parameters are separated by the sign'&'.
<Redirection>: Boolean
Used to define the HTTP return code of the function to the browser. This return code is mainly used for the referencing by the search engines. This parameter can correspond to:
  • : permanent redirection (HTTP code 301). The page displayed by the function will be referenced directly.
  • False (value by Default): temporary redirection (HTTP code 302). Only the source page will be referenced.
Remarks

Displaying other files

ScriptDisplay can be used also on a document that is not a script. In this case, the document is returned (equivalent to FileDisplay, by specifying a URL instead of a physical address).

Encoding the parameters of ScriptDisplay

The content of the parameters of ScriptDisplay is automatically encoded to be interpreted by the browsers:
  • transformation into UTF-8 (according to the options of the page and project).
  • encoding of special characters.
Therefore, there is no need to use URLEncode to encode one of the parameters of ScriptDisplay.

Pre-launched sessions

If your project uses pre-launched sessions, this function must not be used in the project initialization event. This function must be used in the "Initialization in pre-launched session mode" event.
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