4D v14.3

OPEN WEB URL

Home

 
4D v14.3
OPEN WEB URL

OPEN WEB URL 


 

OPEN WEB URL ( path {; *} ) 
Parameter Type   Description
path  String in Startup URL
Operator in If specified = URL is not translated, If omitted = URL is translated

The OPEN WEB URL command opens the file or URL passed in the url 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.

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/Laurent/Documents/pending.htm")
 OPEN WEB URL("C:\\Users\\Laurent\\Documents\\pending.htm")
 OPEN WEB URL("mailto:jean_martin@4d.fr")

This example can be used to launch the most suitable application:

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

 
PROPERTIES 

Product: 4D
Theme: Tools
Number: 673

 
HISTORY 

Modified: 4D v11 SQL Release 2

 
ARTICLE USAGE

4D Language Reference ( 4D v11 SQL Release 6)
4D Language Reference ( 4D v12.4)
4D Language Reference ( 4D v14 R2)
4D Language Reference ( 4D v13.5)
4D Language Reference ( 4D v14.3)

Parent of : OPEN URL ( 4D v14 R3)