Accessibility

TechNote

Creating and Saving a Frameset

Working with framesets
Framesets provide a useful way of presenting content, but they can be confusing to develop. Use the following process as a guide to develop your own frameset.

Basic Process for developing a frameset

1 Design the layout of the frameset.
2 Name the frames in the frameset.
3 Save the frameset and the files in the frames.

Tutorial frameset
To illustrate these steps, the following instructions will walk you through creating a frameset consisting of a frame extending along the top (for a banner/title area), a frame along the lower left (for a nav bar), and frame along the lower right (for the main content area).

Note:You can follow the steps below to create the tutorial frameset described above. If, however, you use one of the preset framesets available in the Frames category of the Object panel, the individual frames are already named;so skip to the Save the frameset and source files in the frames below.

Design the layout of the frameset

1 Use File > New to open a new document.
2 Use Modify > Frameset > Split Frame Up to split the screen into top and bottom frames.
3 Drag the frame border up until it is about two inches from the top of the screen. This will serve as the banner area.
4 Place the cursor in the bottom frame and use Modify > Frameset > Split Frame Left to split the bottom frame.
5 Drag the frame border to the left until it is about two inches from the left side of the screen. This will serve as the navigation bar area. The large right frame will be the content area.
6 Open the Property inspector by choosing Window > Properties.
7 Open the floating Frames panel by choosing Window > Frames. Note that the Frames panel visually displays the individual frames [with (no name)] that make up the frameset.
Note:For instructions on creating a frames layout with specific pixel settings, see How to set the frames in a frameset to a specific size (TechNote 14141).

Name the frames in the frameset
In order to target frames, they must have a name. A frame name is different than a title or the name used to save the page (file name) for the frame source documents.

Naming the individual frames

1 Click the left frame in the Frames panel to select it.
2 Type leftframe in the Frame Name text box on the Property inspector.
3 Repeat steps 1 and 2 for the right and top frames. Name the top frame topframe and the bottom right frame rightframe.
4 The frames panel will now show the frame names in the appropriate frames on the Frames panel. See Example 1 to view the named frames.
Note:Frame names follow the same rules as other HTML elements. A frame name should be a single word. Underscores (_) are allowed, but hyphens, periods, and spaces are not. Frame names should start with a letter (not a number). Don't use JavaScript reserved words such as top or navigator for frame names.

Save the frameset and the source documents in the frames
In our tutorial frameset, there are actually 4 HTML documents: the frameset document as well as 3 separate source documents. The frameset is the outermost document, and contains the 3 different source documents for the individual frames. After naming the frames, you will need to save both the frameset document and the 3 source documents. Below are two methods of saving the frameset and the associated source HTML pages with a minimum of confusion.

Saving all the documents associated with your frameset

Method 1

1

Choose File > Save Frameset.

2

Name and save the frameset document as an HTM or HTML within your site folder.

3

Click within the left frame in the Document window.

4

Choose File > Save.

5

Name and save the frame's source document as an HTM or HTML file within your site folder.

6

Repeat steps 3- 5 for the top frame and the bottom right frame in the tutorial frameset.

Method 2

1

Choose File > Save All Frames to save the frameset and the individual source documents as HTML documents.

2

A Save As dialog box appears, prompting you to save the frameset. You will see a slanted lines (Windows) or a fuzzy line (Macintosh) border around the frameset in the Document Window.

3

Name and save the frameset document as an HTM or HTML file within your site folder.

4

A Save As dialog box will appear again, prompting you to save a frame's source document. The extra border in the document window indicates to you through which frame the source document will appear.

5

Name and save the frame source document as an HTM or HTML file within your site folder.

6

Steps 4 - 5 for the top frame and the bottom right frame in the tutorial frameset will automatically be repeated in this method.

By completing this tutorial frameset, you have now created four HTML documents: a frameset and 3 source documents (which are displayed within the different frames in the frameset). Example 2 displays the Site window for this tutorial frameset (the frameset is named index.htm, and the source documents are named nav_bar.htm, content.htm, and banner.htm). Example 3 launches the tutorial frameset itself. Now that the source documents have been named and saved, they are ready to receive content.

Note:Once you have saved the frameset and all the source documents using either of the two methods above, you can thereafter use File > Save All Frames to save the individual files that make up the frameset.

Additional information
For more information about working with frames, consult:

Frame Fundamentals (a general information article).
Why is the browser not able to preview the documents in a frameset? (TechNote 13571).
How to set the title of a frameset (Technote 12761).


AlertThis content requires Flash

To view this content, JavaScript must be enabled, and you need the latest version of the Adobe Flash Player.

Download the free Flash Player now!

Get Adobe Flash Player

Creative Commons License

Search Support


Document Details

ID:tn_15130
Browser:Chrome
Internet Explorer
Netscape
Opera
Safari
Firefox

Products Affected: