@URLOpen (Formula Language)

Retrieves a World Wide Web page specified by its URL.

Syntax

@URLOpen

@URLOpen( urlstring )

@URLOpen( urlstring ; [ reloadflag ] )

@URLOpen( urlstring ; [URLLIST] )

@URLOpen( urlstring ; [ reloadflag ]:[URLLIST] )

@URLOpen( urlstring ; [ reloadflag ]:[URLLIST] ; charset )

@URLOpen( urlstring ; [ reloadflag ]:[URLLIST] ; charset ; webusername )

@URLOpen( urlstring ; [ reloadflag ]:[URLLIST] ; charset ; webusername ; webpassword )

@URLOpen( urlstring ; [ reloadflag ]:[URLLIST] ; charset ; webusername ; webpassword ; proxywebusername )

@URLOpen( urlstring ; [ reloadflag ]:[URLLIST] ; charset ; webusername ; webpassword ; proxywebusername ; proxywebpassword )

Parameters

urlstring

Text. Optional. The URL for the Web page you want to open, for example, http://www.acme.com/. This parameter may also include comma-separated arguments to be passed by Domino® to the javascript window.open command.

[ reloadflag ]

Keyword. Optional.

RELOAD. Reloads the page from its Internet server.

RELOADIFMODIFIED. Reloads the page only if it has been modified on its Internet server.

[URLLIST]

Keyword. Optional. Web pages can contain URL links to other Web pages. This keyword specifies that the Web Navigator should save the URLs in a field called URLLinksn in the Notes/Domino document. (The Web Navigator creates a new URLLinksn field each time the field size reaches 64K. For example, the first URLLinks field would be URLLinks1, the second would be URLLinks2, and so on.)

If you save the URLs, you can use them in agents; for example, you could create an agent that opens Web pages in the Web Navigator database and then loads all the Web pages saved in each of the URLLinksn field(s).

CAUTION: Saving URLs in the URLLinksn field(s) may affect performance.

[RELOAD] : [URLLIST]

Keywords. Optional. Specify both keywords to force a reload of the Web page and save the URLs in the URLLinksn field in the Notes/Domino document.

charset

Text. Optional. Enter the MIME character set (for example, ISO-2022-JP for Japanese or ISO-8859-1 for United States) that you want the Web Navigator to use when processing the Web page. Only use this parameter when the Web Navigator detects the MIME character set of the URL contents incorrectly.

webusername

Text. Optional. Some Internet servers require you to obtain a user name before you can access their pages. This parameter allows you to enter the user name that you previously obtained from the Internet server.

webpassword

Text. Optional. Some Internet servers require you to obtain a password before you can access their pages. This parameter allows you to enter the password that you previously obtained from the Internet server.

proxywebusername

Text. Optional. Some proxy servers require that you specify a user name in order to connect through them. This parameter allows you to enter the user name for the proxy server. See your administrator for the user name required by the proxy.

proxywebpassword

Text. Optional. Some proxy servers require that you specify a password in order to connect through them. This parameter allows you to enter the password for the proxy server. See your administrator for the password required by the proxy.

Usage

The @URLOpen function works from both the Notes/Domino workstation and server.

The user name and password parameters work only with the Notes® Web Navigator. Other browsers always prompt for authentication.

For use on the server, you need to specify at least one parameter with the function; using the function without any parameters will attempt to display the URL Open dialog box which cannot be done from the server. If you want to use any of the parameters that follow the Reload and URLList keywords without specifying values for either of the keywords, enter a zero (0) in place of the keyword value(s). For example, @URLOpen("http://www.ibm.com";0;"myusername";"mypassword").

When a Notes® browser triggers the @URLOpen function, it displays the retrieved Web page in a new window. When the @URLOpen function is used on a form or page that is accessed by a non-Notes browser, Domino® generates a javascript window.open command with the following syntax:

window.open( [sURL] [, sName] [, sFeatures] [, bReplace]) 

To display the retrieved Web page in a new window, pass the values for sName and sFeatures (if desired) as comma-separated arguments within the urlstring. For example, @URLOpen("http://www.ibm.com','NEW"). Be sure to use double quotes at the beginning and end of the urlstring parameter, and single quotes before and after each comma separating the arguments to be passed to window.open. Do not include any spaces.

To open another design element from the current Notes® database in a Web application, use the @WebDbName function to properly encode the database name.

Examples

  1. This example displays the URL Open dialog box that allows a user to enter the URL.
    @URLOpen
  2. This example opens the www.acme.com Web page from the database if it is found there. If the page is not found in the database, it is retrieved from the Web, loaded into the database, and then opened.
    @URLOpen("http://www.acme.com/")
  3. This example retrieves the www.acme.com Web page from the Web, loads it into the database, and then opens it.
    @URLOpen("http://www.acme.com/"; 1)
  4. The following code, when added to an action on the "Purchasing" Web application form, opens the "CustomerInfo" Notes® form, which resides in the same database:
    @URLOpen(@WebDbName + "/CustomerInfo?OpenForm")
  5. The following code, in a document viewed from the Web, will open the www.acme.com Web page in the same window (_self) as that document.
    @URLOpen("http://www.acme.com")
  6. The following code, in a document viewed from the Web, will open the www.acme.com Web page in a new window (_blank). Note that the window will not have any sFeatures assigned by previous javascript commands.
    @URLOpen("http://www.acme.com','_blank")
  7. The following code, in a document viewed from the Web, will open the www.acme.com Web page in a new window (_blank). All sFeatures will be inherited from the calling window.
    @URLOpen("http://www.acme.com','_blank','")
  8. The following code, in a document viewed from the Web, will open the www.acme.com Web page in a new window (NEW). The window will not inherit any sFeatures.
    @URLOpen("http://www.acme.com','NEW")
  9. In a document viewed from the Web, clicking on the following hyperlink will open a new window (mywindow) displaying the www.yahoo.com Web page.
    <a href="javascript: mywin = window.open('http://www.yahoo.com','mywindow');mywin.focus()">yahoo</a>

    The following code will open the www.acme.com Web page in the mywindow window. All sFeatures will be inherited from the mywindow calling window.

    @URLOpen("http://www.acme.com','mywindow','")