Attributes of the Object element

The Object element is part of the HTML specification for ActiveX controls. It defines several standard attributes, and PowerBuilder defines additional attributes.

HTML attributes

HTML attributes specify the class ID, the name, and the space reserved for the PowerBuilder window ActiveX on the Web page.

Table 34-2: HTML attributes of Object element

HTML attribute

Value

NAME

Name of the object when referenced in code or when submitted as part of a form.

CLASSID

The class ID of the registered ActiveX control.

The syntax is:

CLSID:class_id

To find the class ID value of the registered ActiveX control, you can use the PowerBuilder Browser’s OLE tab. Expand the OLE Custom Controls item, then expand the PowerBuilder Window Control or Secure Window Control item. The class ID is the value of the GUID item of the Class Information branch.

CODEBASE

A URL identifying the location of the OCX or CAB file to be downloaded if the client machine does not contain the PowerBuilder window ActiveX.

The client machine must still have the PowerBuilder virtual machine and any other required DLLs on the system path.

WIDTH

The width of the viewing window in pixels.

HEIGHT

The height of the viewing window in pixels.

The WIDTH and HEIGHT attributes define the maximum width and height of the child window. If the child window is resizable, the user can make it smaller than the specified size, but not larger.

Param elements

To specify properties for the PowerBuilder window ActiveX, include Param elements. Param elements let you identify the window object that starts your application, the Application object, additional libraries, and additional parameters to pass to the PowerBuilder window ActiveX. Table 34-3 lists the PowerBuilder-specific Param elements.

Table 34-3: PowerBuilder window ActiveX Param elements

Property

Value

PBWINDOW

The class name of the child window in the PBD.

LIBLIST

A list of PowerBuilder dynamic libraries (PBD files) required by the application. Separate multiple entries with a semicolon.

PBAPPLICATION (optional)

The PowerBuilder Application object.

PBVERSION

The version of the PowerBuilder DLLs (for example, 105).

DISPLAYERRORS (optional)

Boolean indicating whether to display execution errors.

COMMANDPARM (optional)

A string you want to pass to your window. To access this string from within your window, call the CommandParm function.

NoteCoding the Object element To minimize coding errors, use an ActiveX-aware HTML editor (such as the Web targets HTML editor, the ActiveX Control Pad, or Front Page) when coding an Object element and its parameters.