HTML and CSS Reference
In-Depth Information
11.7.4. Traditional Link Behavior
Before the onset of frames, each time you selected a hyperlink, the
corresponding document replaced the contents of the browser window.
With frames, this behavior is modified so that the corresponding docu-
ment replaces the content of the referencing frame. This is often not the
desired behavior, and it can be disconcerting to people browsing your
documents.
For example, suppose you have arranged all of the documents on your
site to present themselves in three frames: a navigational frame at the
top of the browser window, a scrolling content frame in the middle, and
a feedback form at the bottom. You named the content frame with the
name attribute of the <frame> tag in the top-level document for your col-
lection and used the target attribute of the <base> tag in every document
on your site to ensure that all links are loaded into the center content
frame.
This arrangement works perfectly for all the documents on your site, but
what happens when a user selects a link that takes him to a different
site? The referenced document is still loaded into the center content
frame. Now the user is confronted by a document from some other site,
surrounded by your navigation and feedback frames! [3] Very impolite.
[3] Check out Chapter 17 for how to step out into the forefront when your pages happen to be on the
other end of a targetless hyperlink.
The solution is to make sure that every hyperlink that references a re-
mote document has a target of _top . This way, when the user selects a
link that takes him away from your site, the remote document replaces
the contents of the entire browser window, including your navigation
and feedback frames. If the majority of the links in your documents are
to other sites, you might consider adding target="_top" to a <base> tag
in your document and using explicit target attributes in the links to your
local documents.
 
 
Search WWH ::




Custom Search