OPEN WEB URL

4D - Documentation   Français   English   German   Spanish   4D v11 SQL, Command Theme List   4D v11 SQL, Command Alphabetical List   4D v11 SQL, Constant Theme List   Back   Previous   Next

version 11.2 (Modified)


OPEN WEB URL (url{; *})

ParameterTypeDescription
urlStringStartup URL
**If specified = URL is not translated,
If omitted = URL is translated

Description

The OPEN WEB URL command opens the file or URL passed in theurl parameter with the most suitable application.

The url parameter can contain either a standard URL or a file pathname.

4D first attempts to interpret the parameter as a file pathname. The command accepts colons (':') under Mac OS, slashes ('\') under Windows or a Posix URL beginning with file://. If this is the case, 4D will request the system to open the file using the most suitable application (for example, a browser for .html files, Word for .doc files, etc.). The * parameter is ignored in this case.

If the url parameter contains a standard URL (mailto:, news:, http:, etc. protocols), 4D starts the default Web browser and accesses the URL. If there is no browser on the volumes connected to the computer, this command has no effect.

4D automatically encodes the URL's special characters. If you pass the * character, 4D will not translate the URL's special characters. This option allows you to access and to send URLS of type "http://www.server.net/page.htm?q=something".

Note: This command does not work when called from a Web process.

Examples

1. The following examples illustrate different types of strings that are accepted as URLs by the command:

   OPEN WEB URL( "http://www.4d.com")
   OPEN WEB URL( "file://C:/Users/Lauren/Documents/pending.htm")
   OPEN WEB URL( "C:\Users\Lauren\Documents\pending.htm")
   OPEN WEB URL( "mailto:john_martin@4d.com")

2. This example can be used to launch an application :

   $fichier:=Select document("";"";0)
   If(OK = 1)
      OPEN WEB URL(Document)
   End if

4D - Documentation   Français   English   German   Spanish   4D v11 SQL, Command Theme List   4D v11 SQL, Command Alphabetical List   4D v11 SQL, Constant Theme List   Back   Previous   Next