Object element – PB Docs 126

Object element

How it works

ActiveX controls use the Object element to specify the GUID
(a unique identifier) of the control as well as the space the control
takes on the page. The Object tag looks like this:

CODEBASE attribute

If your users need to download the controls, you can include
the CODEBASE attribute in the Object element to identify the file
to be downloaded. After the browser downloads the CAB file, it unpacks
it and registers the ActiveX controls in the user’s system

The value for CODEBASE has the format:

A typical value for CODEBASE uses a relative URL:


The URL is the location of the DataWindow control’s
CAB file on your Web server. It can be an absolute or relative URL.


The version is a set of four numbers, separated by commas.
The numbers must match the version of the CAB file. The version
number of the CAB file is the same as the version number for PowerBuilder.

proc.png To find out the 4-part version number in Windows:

  1. Select the PowerBuilder executable or a
    PowerBuilder DLL in Windows Explorer.

  2. Select File>Properties from the menu

  3. On the Version tab, look at File Version. A typical
    number is 12.6.1.


The Object element with a CODEBASE attribute looks like this:

New versions

When you get new versions of the CAB file, you can change
the version numbers on the Web page and cause the browser to install
a new version of the control.

For more information about how to deploy new versions, see “Deploying the Web ActiveX”.

Putting the Object tag in a separate file

If the Cumulative Security Update for Internet Explorer (912812)
or a subsequent update is installed on the computer where the Web
ActiveX control is running, a browser refresh does not refresh the
control correctly. This update is described in Microsoft Security
Bulletin MS06-013, published in April 2006.

To work around this issue, put the <OBJECT> tag
in a separate JavaScript file instead of the main HTML file, as
shown in this example:

The createElement.js JavaScript file
contains the Object tag:

Document get from Powerbuilder help
Thank you for watching.
Was this article helpful?
Notify of
Inline Feedbacks
View all comments
Would love your thoughts, please comment.x