


W$GETURL works with the Web plug-in. It tells the runtime to pass a given URL (Uniform Resource Locator) to the host browser. The browser handles this URL as if it were typed into the URL entry field. After a CALL to W$GETURL, subsequent URL requests are ignored until the CALL completes. See the separate Acucorp manual A Programmer's Guide to the Internet for a description of the Web plug-in.
Usage
CALL "W$GETURL" USING URL, TARGET
Parameters
URL PIC X(n)
Contains the complete URL. This can be of any type, such as http, ftp, news, mailto, gopher, or javascript.
TARGET PIC X(n)
Represents the destination for displaying the URL. This can be the name of a window or a frame, or one of several special target names. If you specify "_current" or "_self" or "_top", the response data is written to the plug-in window, and the plug-in is unloaded. If you specify "_new" or "_blank", the response data is written to a new browser window.
You can also write the response data to a frame by specifying the frame name as the target parameter.
Comments
After a CALL is made to W$GETURL, subsequent URL requests are ignored until the CALL completes.
Description
Each URL that you pass with the W$GETURL routine contains a protocol and a path, separated by a colon. For example, http://www.acucorp.com/ tells the browser to use the HyperText Transfer Protocol and to contact the Web server "www.acucorp.com" and to ask for the root page (/).
Sending e-mail uses the "mailto" protocol. For example, mailto:support@acucorp.com opens an e-mail message to the user "support" at the machine "acucorp.com".
JavaScript is also supported as a protocol, so you can execute JavaScript sequences that display dialog boxes, create Web pages, build text files, and so forth.
Important
This routine is available only when the calling COBOL program is running in a Web browser window via the ACUCOBOL-GT Web plug-in. The routine is not available to programs run by the standard runtime when the standard runtime is executed by a Web browser. The RETURN-CODE register is set to "1" after a successful call and set to "0" if this routine is unavailable.