Transcript Frames

Frames
Masters Project CS 490
Kevin Murphy
What are frames?
Frames allow the user to view information
from two or more HTML files simultaneously.
The browser’s display area is divided into
several windows with the contents of a
different HTML file visible in each window.
Kevin Murphy
Planning Frames
Before you start creating your frames, you
should first plan their appearance and use.
What information will be displayed in each of
the frames?
How do you want the frames placed on the
Web page? What is the size of each frame?
Kevin Murphy
Planning continued
Which frames will be static—that is, always
showing the same content?
Which frames will change in response to
hyperlinks being clicked?
Do you want to allow users to resize the frames
and change the layout of the page?
Kevin Murphy
Procedure
n
Create the FRAMESET file
n
Create all linked files
Kevin Murphy
HTML Tags
Frame Definition
n
<FRAMESET>....</FRAMESET>
<FRAMESET ROWS = “60,* “>
OR
- <FRAMESET COLS = “140,* “>
-
n
The opening and closing
FRAMESET tags replace the
opening and closing BODY tags.
Kevin Murphy
HTML Tags
Frame Contents
n
<FRAME SRC=“logo.htm”
NAME=Logo>
n
Include a FRAME tag with at least
SRC and NAME attributes for
each frame area on the page.
Kevin Murphy
Targeting Links
n
In your supporting files, create a BASE
TARGET and/or specific TARGET for your
links
n
Just before </HEAD> place:
<BASE TARGET=(Name of frame)>
n
For a specific target:
<A HREF=“free.htm” TARGET=(Name
of frame)>Free</A>
Kevin Murphy
Sample
Logo-(Static)
Table
of Contents(Mostly
Static)
Doc. Frame
(Changes as links
are clicked in TOC
frame)
Frameset has 2
rows
Logo frame src
Nested frameset
has 2 columns
TOC frame src
Doc. frame 1st src
Kevin Murphy
Coding
<FRAMESET ROWS=“60,*” BORDER=0>
<FRAME SRC=“Logo.htm” NAME=Logo>
FRAMESET COLS=“140,*”>
<FRAME SRC=“..” NAME=..>
<FRAME SRC=“..” NAME=..>
</FRAMESET>
</FRAMESET>
Kevin Murphy