How to use the Web ActiveX in a Web target
The PowerBuilder Setup program installs the Web ActiveX and
the Transaction Object control in the system registry. You can find
them in the System Tree on the Components tab.
These procedures provide a summary of the ways you author
Web pages with ActiveX controls in a Web target.
To find the controls in the System Tree:
-
Select the Components tab.
-
Expand ActiveX Controls.
-
Expand Controls that are safely scriptable.
-
Look for the controls with these names:
- Sybase DataWindow Web Control 10
- Sybase DataWindow Transaction Object Control
These controls have Properties and Methods branches (the Web
ActiveX also has an Events branch) that you can expand to view available properties
and methods.
To add the controls to a Web page:
-
Drag the control name from the System Tree
to the Web page
or
Select
Insert>Component>ActiveX from the menu bar, select
the Controls page, make sure that Controls is selected in the drop-down
list box, and select the control (Sybase DataWindow Web Control
or Sybase DataWindow Transaction Object Control) you want.
To set standard ActiveX properties for the control:
-
In the Page view,
right-click the control and select ActiveX OBJECTn Properties
from the pop-up menu, where n is the order
in which the object is placed on the page. When you specify a name
for the control, the menu item uses that name instead of OBJECTn.
or
In
Source view, right-click the Object tag and select Properties
from the pop-up menu. -
In the ActiveX Properties dialog box, specify
the values you want. Some of the more common attributes to set include:- Network Code Base—its value
is the URL and version number of the CAB file that the browser downloads
to install the ActiveX control
For more about the CODEBASE attribute, see “HTML for inserting the controls
on a Web page”. - Width and Height—also set by dragging the
control’s resizing handles in Page view - Name for forms and scripting
- Network Code Base—its value
To set custom properties for the controls:
-
In the Page view, right-click the control
and select Sybase DataWindow Web Control Properties (or Sybase DataWindow
Transaction Object Control Properties) from the pop-up menu.For information on specifying the DataWindow object on the
General tab page, see “Specifying a DataWindow
object for the control”.For information about specifying connection information on
the Transaction and Trans User tab pages, see “Making database connections”.The custom properties dialog box is not available from the
Source view.
Where to set connection properties You need to set connection properties only once. If you are
using a separate Transaction Object control, you do not need to
set properties on the Transaction and Trans User pages for the Web
ActiveX. The same property pages are available for the Transaction
Object control.
To use the System Tree when writing code for the
controls:
-
On the Page tab of the System Tree, expand window in
the Client Side branch. -
Under window, expand Properties
and find the name of your control as one of the properties. -
For the control, expand Properties, Events, or
Methods. -
Find the item you want to insert in the script
editor and drag it to its position in the code.A fully qualified expression is inserted, such as:
1window.dw1.Describe(propertylist)1window.dw1.dbParmSubstitute your own variables and expressions for method parameters.