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
  • Directory of images (in browser code)
  • Specifying the directory of images in WLanguage for generating the HTML code
  • Setup
WINDEV
WindowsLinuxJavaReports and QueriesUser code (UMC)
WEBDEV
WindowsLinuxPHPWEBDEV - Browser code
WINDEV Mobile
AndroidAndroid Widget iPhone/iPadIOS WidgetApple WatchMac Catalyst
Others
Stored procedures
FolderWeb (Function)
In french: RépertoireWeb
Returns the relative path of the directory containing:
  • images,
  • JavaScript files,
  • Java applet files,
  • other files accessible from the browser.
This directory corresponds to the <Project name>_WEB directory. This directory is present on both the development computer and the deployment computer.
Npte: To get the "<Project name>_WEB" directory, you can use:
  • the FolderWeb function: this function returns a relative path to be interpreted by the browser.
  • the fWebDir function: this function returns an absolute path to be used from the server with external file functions (fxxx)..
Example
WEBDEV - Server codeWindowsLinuxPHPAjax
// Champ HTML généré par programmation
NomImage is string = "Hello.gif"
HTM_ChampHTML = "<IMG SRC=""/" + FolderWeb() + "/" + NomImage + """>"
WEBDEV - Browser codeWindowsLinuxPHP
// IMG_IMAGE1 est un champ Image
// Option cochée: 
// "Localiser l'image dans le répertoire _WEB en code navigateur"
// Modification de l'image affichée dans le champ IMG_IMAGE1
IMG_IMAGE1 = "/Image_Plan.gif"
WEBDEV - Browser codeWindowsLinuxPHP
// IMG_IMAGE1 est un champ Image
// Option décochée: 
// "Localiser l'image dans le répertoire _WEB en code navigateur"
// Modification de l'image affichée dans le champ IMG_IMAGE1
IMG_IMAGE1 = FolderWeb() + "Image_Plan.gif"
Syntax
<Result> = FolderWeb()
<Result>: Character string
Relative path of the directory containing the images, the JavaScript files, ...
WEBDEV - Server code The path does not end with the / character.

WEBDEV - Browser code The path is completed by the / character at the beginning and at the end.
Remarks
WEBDEV - Browser codeWindowsLinuxPHP

Directory of images (in browser code)

By default, "Locate the image in the _WEB directory in browser code" is checked when describing an image. In this case, in browser code, the image is automatically sought in the _WEB directory of the site. No specific code is required.
If "Locate the image in the _WEB directory in the browser code" is unchecked, the full image path must be specified in order to find the image. To do so, use FolderWeb.

Specifying the directory of images in WLanguage for generating the HTML code

FolderWeb can be used to specify the directory of images when generating the HTML code in WLanguage.
If the HTML code must contain references to images or to any other static object (Java or JavaScript file), FolderWeb must be used to localize these files.

Setup

In the setup is performed via physical media, the directory of the data files is specified during the setup.
For a remote setup (FTP), the Internet provider supplies the base directory for the data files and the user supplies the name of the subdirectory in which the data files are installed.
Component: wd300dllexe.dll
Minimum version required
  • Version 9
Comments
Click [Add] to post a comment

Last update: 09/19/2024

Send a report | Local help