Chapter 13
Frames-Pages with Split Personalities
CONTENTS
Frames are a relatively new addition to the Internet scene. They
offer an easier way to navigate through a Web site, creating a
more user-friendly interface to the outside world. They were first
introduced in Netscape 2.0, and are now supported by Netscape
3.0 and Internet Explorer 3.0. Soon, many other browsers will
support them. You cannot view framesets directly in FrontPage,
but the package includes an easy way to develop them.
You can think of a frame as multiple pages in one. They really
are what the title of this chapter implies: pages with split personalities.
Each region of a framed page displays a separate page that is
scrollable, just like any other Web page.
Figure 13.1 shows four pages loaded into a frameset. This frameset
is used in the support site for this book. A frameset is
a special kind of page that is divided into multiple sections,
called frames. You assign it a URL, just as you would any
other page. The frameset gets loaded first when a user navigates
to the URL. Next, the frameset loads the pages referenced by source
URLs, and it displays each page in a separate frame.
Figure 13.1 : A frameset displays multiple pages in a single screen.
Each frame within the frameset has a source URL-the URL
of the Web page that gets loaded into the frameset when it first
opens. The source URL can belong to a page, a file, or another
frameset in your web. In the example shown in Figure 13.1, you
see four individual pages displayed in the frameset. The navigation
bar is the source URL for the top frame in the frameset. The main
section table of contents is the source URL for the left frame
in the frameset. The welcome screen is the source URL for the
right frame in the frameset. Finally, the bottom frame that displays
links to the Microsoft FrontPage home page and the Internet Explorer
download area is the source URL for the bottom frame in the frameset.
If one of the frames in the frameset displays another frameset,
the initial frame is called a parent frame, or the master
frame that displays another frameset within it. For example, the
table of contents section in the frameset shown in Figure 13.1
can contain a link to a discussion group. When the discussion
group loads into the main frame, it displays in two frames within
the main frame window, making a total of five frames displayed
in the frameset instead of four. The original frameset is the
parent frame, and the discussion group frameset is a child frame.
In FrontPage, you'll see mention of target frames in two
ways, which can get a little confusing. If you look in the General
tab of the Page Properties dialog box, you find a field in which
you enter the Default Target Frame for a page. Entering a frame
name in this field basically tells the frameset, "When the
user clicks any link on this page, load the referenced
page into this frame." In the Create Link dialog box, under
any of the tabs (Open Pages, Current FrontPage Web, World Wide
Web, and New Page tabs), you see a field where you specify a Target
Frame. (It doesn't have the Default in front of it.) When
you enter a frame name in this field while you create a link,
it tells the frameset, "When the user clicks only this
link, load the referenced page into this frame, regardless
of what the default target frame is." When you specify a
target frame, you do not enter a URL. Instead, you enter the name
of one of the frames in the page, such as top, contents, main,
and bottom.
Take a look again at Figure 13.1. The navigation bar resides in
the frame named top. When the user clicks the Links link in the
navigation bar, it creates a change in the contents frame (the
left frame in the frameset), as shown in Figure 13.2. The contents
frame is, therefore, the target frame assigned to the navigation
bar page.
Figure 13.2 : The top frame causes changes in the contents frame on the left. The contents frame is the target frame for the top navigation bar.
When a user clicks a link in the contents frame, changes occur
in the main frame (the large frame at the right in the frameset).
This is shown in Figure 13.3. Here, the main frame is the
target frame for the pages that display in the contents frame.
Figure 13.3 : The contents frame on the left causes changes in the main frame on the right. The main frame is the target frame for the contents pages.
The main frame in the frameset displays the main content in the
web. When a user clicks a link in a page in the main frame, it
does not cause any changes to occur in other frames. The main
frame acts like a full-screen page in this regard. If links to
other sites appear in the main pages, care must be taken to assign
those links a target frame name of _top, as discussed
in "Naming the Target Frames," later in this chapter.
One frame, such as a navigation bar or a table of contents, is
commonly used to link to other pages that display in another frame.
This makes for easier navigation through a site. Instead of returning
with a link or the Back button in a browser as with standard Web
pages, the table of contents displays in its own frame, while
its links appear in another frame.
Frames also work well for an online book. The table of contents
for each section of the book can appear in one frame, the content
of each chapter can appear in another frame, and footnotes for
a page can appear in yet another frame.
A formal presentation is another good candidate for frames. The
outline of the presentation appears in one frame and the graphics
appear in another. You can use a third frame in the set for navigation
buttons.
Frames offer you great flexibility in displaying pages. Don't
let your Web site rely totally on that flexibility, however. Many
people use browsers that are not compatible with frames. Others
use different browsers at different times for various reasons.
For example, a user might prefer the way one browser views mail
and newsgroups over another, and that choice might not have frame
compatibility.
It is frustrating to browse the Web and find someone talking about
a great site. You want to check it out, so you navigate to the
page. A message pops up that reads, "Your browser is not
frame compliant. You cannot see this site unless you use a frame-compatible
browser." It gives you no clue about which browser to use,
and there is no way to exit, unless you use the Back button in
your browser.
Be considerate to those out there who do not have frame-compatible
browsers or who do not use them all the time. Provide alternatives
for navigating to the pages that you display within the frames.
Because a frameset involves multiple pages that are linked together,
you must have a web open to save the pages when they are created.
Open a web in the FrontPage Explorer before you create pages with
the Frames Wizard. You can select a predefined frame template
or design your own.
You begin any frameset with the Frames Wizard in the New Page
dialog box.
To create a frameset, perform the following steps:
- Create or open a web in the FrontPage Explorer. The frameset
and its associated pages are saved to this web after the wizard
generates them.
- From the FrontPage Editor, select File | New
(Ctrl+N). The New Page dialog box appears.
- From the list of available page templates and wizards, choose
Frames Wizard. The Choose Technique panel of the Frames Wizard
appears. (See Figure 13.4.)
Figure 13.4 : Use the Choose Technique panel to choose a frames template or to design your own.
Several frame templates are already built for you. To use one
of these predefined templates, select the Pick a Template
option in the Choose Technique panel of the Frames Wizard:
- From the Choose Technique panel of the Frames Wizard, select
Pick a Template.
- Click Next. The Pick Template Layout panel appears.
(See Figure 13.5.)
Figure 13.5 : Use the Pick Template Layout panel to select a template.
- Select a frame layout from the list of options. As you make
a selection, a preview of the layout appears on the left of the
panel. Each frame in the frameset is labeled with a name. A description
of the template also appears in the Pick Template Layout panel.
- After you choose a template, click Next. The Choose
Alternate Content panel appears (see Figure 13.6), where you select
an alternate page for users without frame-compatible browsers.
If you do not already have an alternate page, you can create one
after you create your frameset and modify the frameset later.
Figure 13.6 : Use the Choose Alternate Content panel to select a page that can be viewed with browsers that do not support frames.
- To specify an alternate page to display instead of the frameset,
click the Browse button to choose another page in your
Web. The Choose Source URL dialog box shown in Figure 13.7 appears.
Figure 13.7 : Use the Choose Source URL dialog box to select an alternate page to display in lieu of the frameset.
- Highlight the page you want to use for alternate content in
the HTML Page list and choose OK. You return to the Choose Alternate
Content screen. Click Next. The Save Page panel appears.
- Enter a title for the frameset in the Title field. For example,
enter Charlie's Home Page.
- Enter the URL of the frameset in the URL field. If you want
to use the frameset for your home page, enter index.htm
or the URL required by your remote server.
- Click Finish to create the frameset. The frameset and its
associated pages are saved to the currently opened web.
FrontPage comes with six frame templates:
Banner with nested table of contents
Main document plus footnotes
Navigation bars with internal table of contents
Nested three-level hierarchy
Simple table of contents
Top-down three-level hierarchy
Create a page using one of the templates to find out how it works.
You will learn a lot. The following sections describe what each
frame template produces.
Banner with Nested Table of Contents
The banner with nested table of contents frameset generates four
pages; one is the frameset and the other three are the source
URL pages. Figure 13.8 shows an example of this template.
Figure 13.8 : The banner with nested table of contents frameset displays three pages in separate frames.
In the example shown, the frameset was assigned a title of Andy's
Place and a URL of index.htm. The pages generated
by the Frames Wizard were named as follows:
- Andy's Place (index.htm). This frameset is created
by the banner with nested table of contents frameset. If you open
this frame in the FrontPage Editor, the Frames Wizard appears
again, and you can edit the frameset.
- Banner frame in Andy's Place (frbanner.htm). This
page is loaded into the top frame in the frameset. It contains
links to all the contents pages in the web, which are displayed
in the contents frame. In other words, when the user clicks the
navigation links in this frame, the referenced page appears in
the table of contents frame.
- Table of contents frame in Andy's Place (frconten.htm).
This page is located at the left side of the frameset. It contains
links to the main pages in a section of the web. It can also contain
links to all the bookmarks on a long page. The pages loaded into
this frame have a target frame of main. When the user clicks a
link in this frame, the referenced page appears in the main frame
of the frameset.
- Main frame in Andy's Place (frmain.htm). This frame
contains the main documents that the user views. It does not cause
changes in other frames.
Main Document Plus Footnotes
The main document plus footnotes frameset generates three pages;
one is the frameset, and the other two are the source URLs for
the frameset. This frameset is best used for an online book that
contains footnotes. When the user clicks a footnote reference
in the main document, the footnote displays in the bottom frame.
Figure 13.9 shows an example.
Figure 13.9 : The main document plus footnotes frame template is a good choice for an online book.
If, for example, you create this frameset with a title of The
Sunshine Report and assign it a URL of index.htm,
the pages generated by this frame template are
- The Sunshine Report (index.htm). This is the frameset.
It holds the other two pages. If you open this frame in the FrontPage
Editor, the Frames Wizard appears again, and you can edit the
frameset.
- Main frame in the Sunshine Report (frmain.htm). This
frame displays the main pages in the online book. When the user
clicks a link in this frame, footnotes appear in the footnotes
frame.
- Footnotes frame in the Sunshine Report (frfootno.htm).
The pages or bookmarks that this frame references contain the
footnotes mentioned in the main document. It does not cause changes
in other frames.
Navigation Bars with Internal Table of Contents
The navigation bars with internal table of contents frameset generates
five pages; one is the frameset and the other four are the source
URLs, which are first loaded into the frameset. For an example
of this frameset, refer to Figures 13.1 through 13.3.
If you create this frameset using a page title of Charlie's
Home Page and assign it a URL of index.htm, you
create the following pages:
- Charlie's Home Page (index.htm). This frameset holds
the other four pages. If you open this frame in the FrontPage
Editor, the Frames Wizard appears again, and you can edit the
frameset.
- Top navigation bar frame in Charlie's Home Page (frtop.htm).
This page
contains links to contents pages, which are loaded into the table
of contents frame.
- Table of contents frame in Charlie's Home Page (frconten.htm).
This page contains links to the main pages in the web or to all
the bookmarks on a single page. Clicking these links causes changes
in the main frame.
- Main frame in Charlie's Home Page (frmain.htm). The
pages that this frame references contain the main pages being
viewed. Clicking links in these pages does not cause changes in
other frames.
- Bottom navigation bar in Charlie's Home Page (frbottom.htm).
This frame can display additional navigation bars.
Nested Three-Level Hierarchy
The nested three-level hierarchy frameset generates four pages;
one is the frameset and the other three are the source URLs. An
example is shown in Figure 13.10. In the example shown, the frameset
was named The Ducke Family Home Page and assigned a URL
of index.htm. The pages generated by the Frames Wizard
are as follows:
Figure 13.10 : The nested three-level hierarchy frameset displays three pages.
- The Ducke Family Home Page (index.htm). This frameset
holds the other three pages. If you open this frame in the FrontPage
Editor, the Frames Wizard appears again, and you can edit the
frameset.
- Left frame in the Ducke Family Home Page (frleft.htm).
The pages in this frame contain links to the main sections in
the web. Clicking these links causes changes in the right top
frame.
- Right top frame in the Ducke Family Home Page (frrtop.htm).
The pages in this frame contain links to the main pages in the
section. Clicking these links causes changes in the right bottom
frame.
- Right bottom frame in the Ducke Family Home Page (frrbotto.htm).
The pages in this frame contain the main pages being viewed. Clicking
links in these pages does not cause changes in other frames.
Simple Table of Contents
The simple table of contents frameset generates three pages. One
of these pages is the frameset, and the other two are the source
URLs for the frameset. An example is shown in Figure 13.11.
Figure 13.11 : The simple table of contents frameset holds two frames.
If you use this frameset to create a frameset titled The Ducke
Family Home Page and assign it a URL of index.htm,
you create the following pages:
- The Ducke Family Home Page (index.htm). This
frameset holds the other two pages. If you open this frame in
the FrontPage Editor, the Frames Wizard appears again, and you
can edit the frameset.
- Table of contents frame in The Ducke Family Home Page (frconten.htm).
This frame is shown on the left side of the frameset. It should
hold a table of contents that links to the main pages in the web.
Clicking these links causes changes in the main frame.
- Main frame in The Ducke Family Home Page (frmain.htm).
This frame is shown on the right side of the frameset and contains
the main pages being viewed. Clicking links in these pages does
not cause changes in other frames.
Top-Down Three-Level Hierarchy
The top-down three-level hierarchy frameset, shown in Figure 13.12,
generates four pages. One of these is the frameset, and the other
three are the source URL pages. The frames are arranged one on
top of the other. Links to the main sections appear in the top
frame, and links to the main pages in the web appear in the middle
frame. The main pages appear in the bottom frame.
Figure 13.12 : The top-down three-level hierarchy frameset.
If you create a frameset titled Stargazer Home Page and
assign it a URL of index.htm, the frameset generates
the following pages:
- Stargazer Home Page (index.htm). This frameset holds
the other three pages. If you open this frame in the FrontPage
Editor, the Frames Wizard appears again, and you can edit the
frameset.
- Top frame in Stargazer Home Page (frtop.htm). The
pages that this frame references contain links to the main sections
in the web. Clicking these links causes changes in the middle
frame.
- Middle frame in Stargazer Home Page (frmiddle.htm).
The pages that this frame references contain links to the main
pages in a section. Clicking these links causes changes in the
bottom frame.
- Bottom frame in Stargazer Home Page (frbottom.htm).
The pages that this frame references contain the main pages being
viewed. Clicking links in these pages does not cause changes in
other frames.
If the frameset templates provided with the Frames Wizard do not
strike your fancy, you can design your own framesets. Indeed,
designing a frameset can help you better understand how framesets
and frames work.
The top frame in the frameset contains links to the table of contents
pages. Keep this page very simple, adding text links for now.
You can replace the text links with navigation buttons later on.
To create the page for the top frame in your frameset, follow
these steps:
- From the FrontPage Editor, choose File | New
(Ctrl+N). The New Page dialog box appears.
- From the Template or Wizard field, choose Normal Page and
click OK. The page opens in the FrontPage Editor.
- Enter the following line of text:
Home | Main Section | Links | Discussion | Section 1 Title
|
å Section 2 Title | Section 3 Title
- Format the text in any way you choose. I selected Arial text
and used the Decrease Text Size button on the Format toolbar once
to reduce the width of the line.
- Choose File | Page Properties. The Page Properties
dialog box appears, opened to the General tab.
- In the Title field, enter Top Navigation in Frameset.
- In the Default Target Frame field, enter contents.
When you assign a default target frame to a page, you tell the
frameset, "Any link that appears on this page should load
the referenced page into the framename frame." In
this case, that frame is the contents frame.
- Click OK to exit the Page Properties dialog box.
- Select the text in the navigation bar that reads Main
Section, and choose Edit | Hyperlink (Ctrl+K)
or click the Create or Edit Hyperlink button on the Standard toolbar.
The Create Hyperlink dialog box appears.
- Click the New Page tab. In the Page Title field, edit the
title to read Main Section TOC in Frameset. Edit the
Page URL to read maintoc.htm.
- You'll notice a Target Frame field in this dialog box.
You only assign a target frame to a link when you want the page
to load into a frame other than the default target frame specified
on the originating page. Because you assigned a default target
frame of contents in the Top Navigation in Frame Set
page (the originating page), the frameset knows where the Main
Section TOC in Frame Set link is heading. Leave this entry blank.
- Choose OK. The New Page dialog box appears. Select Normal
Page and choose OK. The Main Section TOC in Frame Set page opens
in the FrontPage Editor.
- From the Window menu, select the Top Navigation in
Frame Set page, which should now look like Figure 13.13. Choose
File | Save (Ctrl+S), or click the Save button on
the Standard toolbar. The Save As dialog box appears.
Figure 13.13 : The top navigation bar contains links to the contents pages in your web.
- In the File Path Within Your FrontPage Web field, edit
the URL to read frtopnav.htm. Choose OK to save
the page.
You have the contents frame already started from the previous
steps. Now, add some links to this frame. You want the links in
this frame to cause changes in the main frame of your frameset.
This page should contain links to the pages in the main section
of your web, as the page title implies. Refer to Figure 13.14
as you develop your page.
Figure 13.14 : The main contents page contains links to the pages in the main section of the web.
To complete the contents page, follow these steps:
- From the Window menu in the FrontPage Editor, choose Main
Section TOC in Frame Set. The page appears in the FrontPage Editor
window.
- Choose File | Page Properties. The Page Properties
dialog box appears, opened to the General tab.
- In the Default Target Frame field, enter main.
This tells the frameset to load any links that appear on this
page into the main frame of the frameset.
- On the first line in the page, enter Home. Then,
press Shift+Enter to insert a normal line break. The insertion
point moves to the next line.
- Enter the following additional lines in the home page, ending
each line (except the last) with a normal line break:
What's New?
Table of Contents
Search
Guest Book
- Format the text in any way you choose. I selected Arial font
again and reduced the size of the text by one size with the Decrease
Font Size button on the Format toolbar.
- Select the text that reads Home. Choose Edit
| Hyperlink (Ctrl+K), or choose the Create or Edit Hyperlink
button on the Standard toolbar. The Create Hyperlink dialog box
appears.
- Select the New Page tab. In the Page Title field, enter Home
Page (Framed). In the Page URL field, enter frhome.htm.
- Leave the Target Frame field blank. The frameset already
knows this page is to be loaded into the main frame.
- Choose OK. The New Page dialog box appears. Highlight Normal
Page and choose OK. The home page appears in the FrontPage Editor
window.
- From the Window menu, select Main Section TOC in Frame
Set. There are four remaining links on this page. You can create
the new links to the other new pages now, or you can save them
for later. When you create the links to these new pages, enter
main in the Target Frame field, as you did in Step 7
for the home page.
- Choose File | Save (Ctrl+S), or click the Save
button on the Standard toolbar. The Save As dialog box appears.
Verify that the page title reads Main Section TOC in Frame Set
and that the file path is maintoc.htm. Then choose OK.
The page is saved to your web.
Now you enter some content into the source URL page for the main
frame. This is the frame in which your main pages appear. Any
links you create on these pages cause the target page to load
into the main frame as well.
For purposes of this chapter, enter a page title and a comment
that instructs you how to complete the page. The page is shown
in Figure 13.15.
Figure 13.15 : Create a basic page for now to display in the main frame of the frameset.
To complete the home page, follow these steps:
- From the Window menu, select Home Page (Framed). The page
opens in the FrontPage Editor window.
- Choose Heading 3 from the Change Style drop-down menu in the
Format Toolbar. Enter Home Page.
- Press Enter. The insertion point moves to the next line, and
is formatted as a normal paragraph.
- Choose Insert | Comment. The Comment dialog
box appears. Enter the following text:
This page is the source URL for the main frame in the frameset.
It can contain an introductory graphic,
welcome message, or
home page contents. When you create graphics for this page or
any page which displays in the main frame of the frameset,
remember that the page will not be displayed in a full browser
window. Size your graphics accordingly.
- Choose OK. The Comment appears on your page. That's it for
this page for now. You want to get into designing the frameset,
don't you?
- Choose File | Save (Ctrl+S), or click the Save
button on the Standard toolbar. Verify that the title reads Home
Page (Framed) and that the file path is frhome.htm. Choose
OK to save the page.
There is still one more page to create-the alternate content page
that gets displayed when users do not use frame-compatible browsers.
This page displays in a full browser window, so you can size the
graphics any way you choose. You'll create another basic page
for now, as shown in Figure 13.16.
Figure 13.16 : Create another basic page to display when not in a frame-compatible browser.
To create the alternate content page, follow these steps:
- From the FrontPage Editor, select the New button on the Standard
toolbar to create a normal page. A new page appears in the FrontPage
Editor.
- Choose Heading 3 from the Change Style drop-down menu on the
Format toolbar. Although you really wouldn't name your home page
as shown in this example, enter a different title for purposes
of demonstration only. Enter Alternate Home Page.
- Press Enter. The insertion point moves to the next line. Enter
the following text:
This page should appear if the user is using a browser
which does not support frames.
- Choose File | Save (Ctrl+S), or select the Save
button from the Standard toolbar. The Save As dialog box appears.
- In the Page Title field, the title Alternate Home Page appears.
Leave this entry as is.
- In the File Path Within Your FrontPage Web field, enter althome.htm.
- Choose OK. The page is saved to your web.
Now that you have all the preliminary content done, you can build
the frameset. To summarize what you have and what you need to
do, here's the rundown. You have four pages in your web to use
in the frameset:
- The Top Navigation in Frameset page (frtopnav.htm)
will be located in one frame in your frameset. Based on the title
of the page, you'll appropriately name the frame top. This page
has a default target frame of contents. You know you'll need to
name another one of the frames in your frameset contents.
- The Main Section TOC in Frameset page (maintoc.htm)
has a default target frame of main. You'll need another frame
in your frameset named main.
- The Home Page (Framed) page (frhome.htm) will display
in the main frame of your frameset. It does not have a default
target frame.
- Finally, the Alternate Home Page (althome.htm) displays
in the browser if the user is not using a frame-compatible browser.
You've got everything you need; now, build a frameset:
- Open the FrontPage Editor, and select File | New
(Ctrl+N). The New Page dialog box appears.
- From the list of available page templates and wizards, choose
Frames Wizard and click OK. The Choose Technique panel of the
Frames Wizard appears.
- Select the Make a Custom Grid radio button. Click Next.
The Edit Frameset Grid panel appears. (See Figure 13.17.)
Figure 13.17 : Use the Edit Frameset Grid panel to design your frameset.
- In this panel, enter the number of rows and columns that you
want in your frameset. As you make your selections, the preview
in the left side of the panel updates to reflect your entries.
Remember that these framesets are displayed within the confines
of a browser window, so don't add too many frames to the frameset.
If you add too many frames, the user must rely too heavily on
scroll buttons to see the contents of your frames. For this project,
enter 2 in the Rows field and 1 in the
Columns field.
TIP |
Don't go overboard on the number of frames in your frameset. Keep in mind that some people browse the Web with low screen resolutions.
|
- To move the dividers between the rows, position the mouse
in the preview screen and place the cursor over the divider line.
Directional arrows appear. Move the divider toward the top edge
of the page until the top section of the frameset is about one
fifth or one sixth of the height of the page preview.
- Shift-click to select the bottom portion of the frameset in
the page preview. The Split button enables. Enter the number
of columns in which to split the middle portion. You can merge
the split columns back together with the Merge button if
you do not like how it looks. For this project, enter 1
in the Rows field and 2 in the Columns
field.
- Move the vertical divider line between the two new columns
toward the right of the page. This creates a larger area for the
main content of the frameset, which should now look like Figure
13.17.
- Click Next. The Edit Frame Attributes panel appears.
- Click the top frame in the frameset preview window. This frame
initially loads the Top Navigation in Frameset page (frtopnav.htm).
In the Name field, enter top.
- Click the Browse button next to the Source URL
field. The Choose Source URL dialog box appears. From the list
of pages in your current web, choose Top Navigation in Frameset
(frtopnav.htm) and click OK. You return to the Edit Frame
Attributes panel.
- The Margin Width and Margin Height settings
designate the size of the borders between frames. For this project,
enter 1 in the Margin Width field and 1
in the Margin Height field. If you don't want borders,
enter 0 in each of these fields.
- The Scrolling setting determines whether a scroll bar
is located at the left and bottom edges of the frame. Here, choose
Yes to include scroll bars, No to not include scroll bars, or
Auto to provide scroll bars when needed. It is generally a good
idea to leave it set to Auto, unless the page length is less than
two or three lines of text. Leave this setting at Auto.
- The Not resizeable checkbox should be checked only
when you do not want the user to resize the frames in the frameset.
It is generally a good idea to leave this option unchecked, allowing
the user to resize the frames as necessary. Leave this option
unchecked for the top frame. Your settings should now look as
shown in Figure 13.18.
Figure 13.18 : The settings for the top frame in the frameset.
- Click the bottom-left frame in the frameset preview window.
This frame displays the main pages when the user clicks a link
in the contents frame on the right. When the user first opens
the frameset, you want to display the Home Page (Framed) page
(frhome.htm) in this frame. For this frame, assign the
following:
Attribute | Value
|
Name | main
|
Source URL | frhome.htm
|
Margin Width | 1
|
Margin Height | 1
|
Scrolling | Auto |
Not resizeable | Unchecked
|
- Click the lower-right frame in the frameset preview window.
This is the frame that displays the Main Section TOC in Frameset
page (maintoc.htm) when the frameset first opens. Assign
the following attributes to it:
Attribute | Value |
Name | contents
|
Source URL | maintoc.htm
|
Margin Width | 1
|
Margin Height | 1
|
Scrolling | Auto |
Not resizeable | Unchecked
|
- Click Next. The Choose Alternate Content panel appears.
- Use the Browse button to select the Alternate Home
Page from your current web, or enter althome.htm in the
Alternate Page URL field.
- Click Next. The Save Page panel appears. (See Figure
13.19.)
Figure 13.19 : Assign a title and a URL for your frameset in the Save Page panel.
- In the Title field, enter Home Page Frame Set.
In the URL field, enter index.htm.
- Click Finish to generate the frameset. The frameset page is
saved to your web.
To see how your frameset looks, open a frame-compatible browser,
such as Netscape 2.0, Netscape 3.0, or Internet Explorer 3.0.
Enter a URL similar to the following, replacing the server name
and Web name with the one you created your frameset in:
http://localhost/yourWebname/index.htm
The browser loads the frameset. It should look like the one in
Figure 13.20.
Figure 13.20 : How your frameset actually looks.
TIP |
If you have a screen capture program, capture a screen shot of the frameset while you view it in 640×480 and in 800×600 resolutions. These screen shots will help you size your graphics appropriately.
|
You can edit a frameset after you create it. When you remove,
add, or rename frames, verify that the new frameset uses the same
frame names as the original one did. The steps to edit a frameset
are similar to those discussed in "Building a Frameset of
Your Own," earlier in this chapter. For example, you might
want to remove, add, or rename frames:
- Use the File | Open command to open the frameset
from the FrontPage Editor. The Open File dialog box appears, opened
to the Current FrontPage Web tab.
- Highlight the frameset page, and click OK. The Frames Wizard
appears again, opened to the Edit Frameset Grid panel.
- Edit the frameset grid, if necessary, using the steps outlined
in "Building a Frameset of Your Own," discussed earlier
in this chapter. Click Next to continue. The Edit Frame
Attributes panel appears.
- Edit the frame attributes as necessary, and click Next
to continue. The Choose Alternate Content panel appears.
- Specify or change the alternate content page for your frameset.
Click Next to continue. The Save Page panel appears.
- Edit the title of your page, if necessary, and click Finish.
To discard the changes, click Cancel.
To edit or add the default target frame of a page, you use the
Page Properties dialog box:
- Use the File | Open command to open the frameset
from the FrontPage Editor. The Open File dialog box appears, opened
to the Current FrontPage Web tab.
- Select the page that you want to edit, and choose OK. The
page opens in the FrontPage Editor.
- Select File | Page Properties. The Page Properties
dialog box appears, opened to the General tab.
- In the Default Target Frame field, enter the name of
the default target frame. All links on the page load the referenced
page into this target frame unless otherwise specified.
- Click OK. Save the page to your web using the File
| Save command.
As you learned in the exercises in this chapter, you can designate
a target frame when you create links from pages in a frameset.
You can display any page in your web inside one of the frames
in a frameset by designating a target frame in the Create Link
or the Edit Link dialog boxes:
- Open the page that you are going to add the link to.
- Select the text, image, or hotspot that the user will click
to navigate to the page.
- Click the Create or Edit Hyperlink button on the Standard
toolbar. The Create Link dialog box appears if you are creating
a new link. The Edit Link dialog box appears if you are editing
an existing link.
- In the Target Frame field, enter the name of the frame
in which you want the page to appear. If you are creating a link
to a page that is not in your current web (that is, a page in
another site on the World Wide Web), refer to the section "Naming
the Target Frames," which follows this topic.
- Click OK. When the frameset is loaded in a frame-compatible
browser, the page displays in the specified frame. If the frameset
is not loaded, the browser may create a new window to display
the page.
When you design a frame grid, you assign each frame in the frameset
a name, such as top, contents, and main. Typically, you assign
a name that describes the frame's location in the frameset. As
you've learned, you can load the pages in your web into any frame
in the frameset.
What happens when you create a link to another site? How do you
specify that you don't want a link to appear in your frameset?
Four frame names have special meanings, as described in Table
13.1.
Table 13.1. Frame names with special significance.
Name | Description
|
_blank | Loads the page to which you are linking in a new browser window.
|
_parent | Loads the page to which you are linking in the parent frame, if the current frame is one that has a parent frame.
|
_self | Loads the page to which you are linking in the same window as the link.
|
_top | Removes the frameset and displays the page to which you are linking in the full browser window. This is most commonly used when creating links to other pages on the World Wide Web.
|
If you have a clickable image, you do not necessarily have to
assign a target frame for each hotspot link that appears on the
page. Instead, you can use the Image Properties dialog box to
assign a global default target frame. This means that all links
in the clickable image that do not have target frames associated
with them are associated with the global default target frame.
To add a default target frame to a clickable image, follow these
steps:
- Click to select the clickable image.
- Choose Edit | Image Properties, or right-click
and choose Image Properties from the pop-up menu. The Image Properties
dialog box shown in Figure 13.21 appears.
Figure 13.21 : Assign a default target frame to a clickable image.
- Choose the General tab if it is currently not selected. In
the Default Hyperlink area, enter the name of the default target
frame in the Target Frame field or use the Browse
button to locate the page in your current web.
- Click OK to exit the Image Properties dialog box.
You also can add a target frame to a hotspot when you create it.
Use the steps outlined in "Assigning Target Frames to Links,"
discussed earlier in this chapter.
In this chapter, you learned how to give your pages multiple personalities
by using framesets. With the Frames Wizard, you designed your
own frameset and learned how to include page content in specified
frames. You even learned how to use the same content for people
who do not use frame-compatible browsers. Now that you know what
frames are and what they do, it is time to hit the ground running
and develop more framesets of your own.
More challenging projects with frames await. In Chapter 18, "Real-
Life Examples III: Adding Navigation and Automation," you
design another frameset for your Web site. Soon, the pages you
design throughout this book will be displayed in a frameset. For
related topics, refer to the following chapters:
- Refer to Chapter 11, "Your Tables Are Ready," to
learn how to create tables that can be inserted into a page.
- Chapter 22, "Runtime Bots-The Heartbeat of FrontPage
Forms," teaches you how to display forms in a frame.
Q: | Can I put anything I want into framesets?
|
A: | More or less, yes. You can insert picture presentations, animations, video files, Java applets, forms (such as those used in the discussion groups), and even links to your favorite sites.
|
NOTE |
Exercise caution when you use links to other sites in your frame pages. When you include a link to a page on someone else's site, assign it a default target frame _top. Otherwise, the pages at the other sites are displayed in your frameset. This
gives the illusion that the pages from the other sites are part of your site. The user continues through the Net with those pages displaying in your frame. You can see what a mess that might cause.
|
Q: | When I divide pages into frames, how large should I make the graphics?
|
A: | The resolutions most commonly used when browsing the Web are 640×480 and 800×600, with the latter being most common. In 640×480 resolution, Netscape's viewing screen measures close to
626×278 pixels. Internet Explorer's measures 610×312 pixels; release 3.0 supports frames. In 800×600 mode, Netscape's screen measures 786×398 pixels, and Internet Explorer measures 764×408 pixels. You can use these figures to
estimate sizes for graphics.
Alternatively, design your frameset and open it in a frame-compatible browser. Using a screen capture program, take a screen shot of the frameset exactly as it appears in your browser at each resolution. That way, you can determine the exact measurements
for your graphics. The hard part is deciding whether you want to design your graphics for 640×480 resolution or for 800×600 resolution. It is probably best to design for 640×480 resolution.
|
Q: | How many frames can I put in a page?
|
A: | As many as you want. Remember, though, that some users display pages at lower resolutions. You do not want to use so many frames that the content of your pages becomes unreadable. If your framesets contain
many sections, check them out at 640×480 resolution before you put them on the Web. If you find it difficult to view many frames in that resolution, your visitors will also. Either reduce the number of frames or recommend that your visitors use a
higher resolution, such as 800×600 or higher.
|