Specifying a Target Frame

You can use frames to subdivide application HTML pages into separate scrollable sections. Frames enable users to explore various information items on a page by scrolling through a section, instead of linking to a separate page. When defining a link from a report component to a report procedure or URL, you can specify that the results of the drill-down link be displayed in a target frame on a webpage.

There are two ways to specify a target frame. You can specify:

  • A target frame in a StyleSheet declaration using the TARGET attribute. You can use StyleSheets to specify that drill-down links from a report or graph are displayed in a target frame on the webpage displaying the report or graph. However, using StyleSheets to specify target frames adds extra HTML syntax to every HREF that is generated.
    Note: When specifying a target frame from the Report canvas, manually added commands in the StyleSheet are not recognized. The Report canvas removes commands that it does not generate itself.
  • A default target frame with a SET command. SET TARGETFRAME puts the HTML code <BASE TARGET="framename"> into the header of the HTML file that WebFOCUS displays. All drill-down links from the base report or graph are directed to the specified frame, unless overridden by the TARGET attribute in the StyleSheet.

To use the TARGET attribute or the SET TARGETFRAME command, you must create multiple frames on the webpage.

Note: You cannot specify a target frame if you are executing a JavaScript function. However, the JavaScript function itself can specify a target frame for its results.

Specify a Target Frame

To specify a target frame in a report or procedure use:

TYPE=type, [subtype], FOCEXEC=fex[(parameters ...)], [TARGET=frame,] $

To specify a target frame for a URL use:

TYPE=type, [subtype], URL=url[(parameters ...)], [TARGET=frame,] $

where:

type
Identifies the report component that the user selects in the web browser to execute the link. The TYPE attribute and its value must appear at the beginning of the declaration.
subtype
Are any additional attributes, such as COLUMN, LINE, or ITEM, that are needed to identify the report component that you are formatting. See Identifying a Report Component in an ibi WebFOCUS StyleSheet for information on identifying report components.
fex
Identifies the file name of the linked procedure to run when the user selects the report component. For details about linking to another procedure, see Linking to Another Report.
url
Identifies any valid URL, or the name of a report column enclosed in parentheses whose value is a valid URL to which the link will jump. For details about linking to a URL, see Linking to a URL.
parameters
Are values being passed to the procedure or URL. You can pass one or more parameters. The entire string of values must be enclosed in parentheses, and separated from each other by a blank space. For details, see Creating Parameters.
frame
Identifies the target frame in the web page in which the output from the drill-down link (either a FOCEXEC or URL) is displayed.

If the name of the target frame contains embedded spaces, the name will be correctly interpreted without enclosing the name in quotation marks. For example:

TYPE=DATA, COLUMN=N1,
FOCEXEC=MYREPORT, TARGET=MY FRAME, $

The name of the target frame is correctly interpreted to be MY FRAME.

You can also use the following standard HTML frame names: _BLANK, _SELF, _PARENT, _TOP.

Specify a Default Target Frame

SET TARGETFRAME=frame

where:

frame
Identifies the target frame in the webpage in which the output from the drill-down link (either a FOCEXEC or URL) is displayed.

Specifying a Target Frame

The following illustrates how to specify a default target frame:

SET TARGETFRAME=_SELF

The following illustrates how to specify a target frame in a request. The relevant StyleSheet declaration is highlighted in the request.

TABLE FILE EMPLOYEE
PRINT CURR_SAL
BY DEPARTMENT
ON TABLE SET STYLE * 
TYPE=DATA, COLUMN=N1, URL=http:\\www.informationbuilders.com,
     TARGET=_SELF, $ 
ENDSTYLE
END