Using the <OBJECT> Tag

When authoring Web pages to launch your application, you can use the <OBJECT> tag to invoke the Web runtime and start your program at the same time.

For example, include the following in your HTML code:


where the following values must equal:

ID The name of the instance of the object. This name is used for scripting the object interface. It is a user-defined value to which you refer in your script.
CLASSID The GUID (globally unique identifier) assigned to the ACUCOBOL-GT Web Runtime control, specifically this value:
CODEBASE The CODEBASE URL, from which the Web runtime can be downloaded and installed automatically by end users, specifically:

where ### is a 3-digit segment that identifies the cab file version. You can also append the version information that applies to the control, including a build number, by adding it as described in the next section. Although the CODEBASE attribute is optional, using it is now a common practice among software vendors to provide access to controls in this way. This allows you to distribute the control easily. If you do not use the CODEBASE attribute, you must direct users to the download page on the Acucorp Web site. Or, with a proper written license agreement, you may provide the control on your own distribution media or Intranet site.

HEIGHT Optional. The height (in pixels) of the object's window. Use to define the area within the browser window that the application object will occupy.
WIDTH Optional. The width (in pixels) of the object's window. Use to define the area within the browser window that the application object will occupy.
SRC The ACUCOBOLGT application you want to run. Typically the name of the library file package with a ".acu" extension.

By default, the application appears in the browser window, using the HEIGHT and WIDTH attributes, if provided, to define the area that the application occupies.

If desired, you can add any of the properties and methods of the Web runtime object interface as parameters of the <OBJECT> tag. To do so, add PARAM NAME= followed by the property name from the object interface enclosed in quotes. You then supply the VALUE attribute.

For example, if you want to have your application appear in its own window rather than in the browser window, set the AcuEmbedded property of the object interface to "FALSE" as follows:


To supply runtime options or specify the name of a configuration file that was included in the library file, use the "AcuOptions" property, as shown below:

<PARAM NAME="AcuOptions"  VALUE="-d -c cblconfi">

The following options are valid for the Web runtime: -c, -d, -e, -l, -v, or -x.

The following example illustrates how you might debug your application and display it in a separate window.

<OBJECT ID="AcuGTAX1" WIDTH="512" HEIGHT="384"   
<PARAM NAME="SRC" VALUE="http://yourserver/yourdirectory/yourprogram.acu"> 
<PARAM NAME="AcuOptions"  VALUE="-d -c cblconfi"> 
Note: Since this example invokes the runtime in debug mode instantly, no scripting is necessary. In this case, "yourprogram.acu" is the name of a library.

For more information on the object interface, see Web runtime object interface.