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:
<OBJECT ID="AcuGTAX1" WIDTH=512 HEIGHT=384 CLASSID="CLSID:077C768D-64C1-4AC1-845D-4589B4B2C24E" CODEBASE="http://www.acucorp.com/support/downloads/acugtax/acugtax800.cab#Version=8,0,0,900"> <PARAM NAME="SRC" VALUE="http://192.168.128.100/webinfo.acu"> </OBJECT>
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:
<PARAM NAME="AcuEmbedded" VALUE="FALSE">
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" CLASSID="clsid:077C768D-64C1-4AC1-845D-4589B4B2C24E" CODEBASE="http://www.acucorp.com/support/downloads/acugtax/acugtax800.cab#Version=8,0,0,900"> <PARAM NAME="AcuEmbedded" VALUE="FALSE"> <PARAM NAME="SRC" VALUE="http://yourserver/yourdirectory/yourprogram.acu"> <PARAM NAME="AcuOptions" VALUE="-d -c cblconfi"> </OBJECT>
For more information on the object interface, see Web runtime object interface.