Using Frames with Webclasses

See Also

HTML has a feature that allows you to divide the display area in a browser into two or more sections. These sections are called frames. Each frame can display content from a different Web page. For example, suppose you are working with a catalog application. You might use frames to display a list of all items in the catalog in one frame and detail for the selected item in a second frame.

Frames are created from an HTML page that contains tags known as FRAMESET tags. The FRAMESET tags indicate how many frames the page should contain, their size and position, and the HTML pages that should be displayed in each frame. The browser accesses the page containing the frameset information, processes the tags, and shows the resulting information to the user.

If you want to use frames with a webclass application, the simplest way to do it is to use an HTML template file to contain modified frameset information, add it to your webclass, then link webitems or events to each frame. The following HTML code shows how you might create a template file with frameset information.

<FRAMESET frameBorder=0 cols=30%,70% TARGET=Right MARGINHEIGHT=0>
   <FRAME id=Left>
   <FRAME id=Right>
</FRAMESET>

Normally, you would need to include information telling the browser what content to display in each frame. However, in a webclass application, you do not need to do this because you can link webitems or custom events to each frame and use the processing defined for those items to tell the webclass what to do. The following figure shows how the .htm file shown above would display in the page designer prior to connecting any events:

Frame Document in the Webclass Designer

For the frames above, you might link a custom event called ShowList to the first frame, and a custom event called ShowDetail to the left frame. You would define processing for ShowList that writes a list of the items in your catalog to the leftmost frame. You would define processing for ShowDetail that displays detail information for the first item in the list. When the browser opens the frameset template file, it parses these two events and displays the results. The user can then work with the data in the list and detail frames.

For More Information   See "Frameset" in the Internet Client SDK for more information on the frameset tags.