Attributes of the Embed element

The Embed element is part of the HTML specification for plug-ins. It defines several standard attributes, and PowerBuilder defines additional attributes.

HTML attributes

HTML attributes name the file to be downloaded to the client and the space reserved for the plug-in on the Web page.

Table 33-5: HTML Embed element attributes

HTML attribute

Value

SRC

A URL identifying the object to be downloaded.

When the browser processes the Embed element, it requests the resource from the server and finds the DLL that handles the content type in its Plugins directory.

For a PowerBuilder window plug-in, the object is a PBD containing the child window that starts the application.

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.

PowerBuilder attributes

The PowerBuilder attributes for the Embed element let you identify the window object that starts your application, additional libraries, parameters to pass to the application, and the name of your Application object.

Table 33-6: PowerBuilder Embed element attributes

PowerBuilder attribute

Value

WINDOW

The class name of the child window in the PBD.

LIBRARY (optional)

A URL specifying an additional PBD that contains objects that your application needs. You must specify the full URL for the PBD, rather than a relative one.

You can specify more than one LIBRARY attribute. Specify a LIBRARY attribute for each additional PBD your application needs. Do not specify a LIBRARY attribute for the file specified for SRC.

For an example of HTML code that uses the LIBRARY attribute, see “Embed element with additional attributes”.

COMMANDPARM (optional)

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

For an example of HTML code that uses the COMMANDPARM attribute, see “Embed element with additional attributes”.

APPLICATION (optional)

The name of the Application object in the PBD.

This gives your plug-in application access to the Application object’s Open and Close events, as well as to global variables and global functions used in the application.

When you use the APPLICATION attribute, the Application object’s Open and Close events execute by default, and cannot be overridden. Make sure the Application object’s Open event does not open the child window specified by the WINDOW attribute. If it does, your application will fail.

For an example of HTML code that uses the APPLICATION attribute, see “Embed element with additional attributes”.