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.

StepsTo find the controls in the System Tree:

  1. Select the Components tab.

  2. Expand ActiveX Controls.

  3. Expand Controls.

  4. Look for the controls with these names:

    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.

StepsTo add the controls to a Web page:

  1. 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.

StepsTo set standard ActiveX properties for the control:

  1. 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.

  2. In the ActiveX Properties dialog box, specify the values you want. Some of the more common attributes to set include:

StepsTo set custom properties for the controls:

  1. 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.

NoteWhere 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.

StepsTo use the System Tree when writing code for the controls:

  1. On the Page tab of the System Tree, expand window in the Client Side branch.

  2. Under window, expand Properties and find the name of your control as one of the properties.

  3. For the control, expand Properties, Events, or Methods.

  4. 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:

    window.dw1.Describe(propertylist)
    
    window.dw1.dbParm
    

    Substitute your own variables and expressions for method parameters.