Understanding How Frames Work

 < Day Day Up > 



By default, a Web browser displays a single page at a time. To display more than one page in a single browser window, you need to tell the browser application how to divide the window into frames and then specify which HTML pages to display within each frame. The document that tells the browser how to divide the window is the frameset document. The <frameset> tag includes information about the number, size, and orientation of all frames, plus the options to enable or disable frame borders.

<frameset> <frame> <frame> </frameset>

Each <frame> tag contains information about the page to display within the frame, margin settings, how scrolling will occur when the content of the page is greater than the size of the frame, and whether the user can resize the individual frame areas.

Building a framed site means that you will be working with three or more pages where previously you worked with only one. The most common use of frames is to isolate the navigation from the content.

Within each frame, standard HTML pages are displayed and work exactly as they would within a normal browser window, except that links target a specific frame. To target a frame means to tell the browser where to load the requested page. Generally, this means to tell the browser the name of the frame where the page should load.

The advantages of using frames

There are distinct advantages to using frames. When navigation is displayed in a separate frame, it can be accessible at all times, and users can scroll through the content without interacting with the navigation. This can also mean that the navigation doesn't reload when a new page is called.

Frames are popular for extremely large sites or intranet sites that have many groups, departments, or divisions, because frames allow compartmentalization of the page. One frame can hold the main navigation, which remains constant. Another frame might display different navigation, depending upon which group, department, or division is entered. A third frame might display content selected from the secondary navigation. With so much going on at one time, it's nice that the main and secondary navigation don't reload with every page call.

The disadvantages of using frames

The disadvantages of using frames are many and well-touted. Much of the dislike of frames comes from the frustration of visiting poorly designed sites that use frames improperly. Framed sites generally require more work since you are handling more pages; they also require specific linking methods. When done incorrectly, the pages don't work, which can make the user experience negative.

Perhaps the two most notorious drawbacks to frames are the bookmarking and printing of framed pages. When the user finds a desired page and tries to create a bookmark, it is the frameset document that is marked, not the specific page that appears in any frame. The browser remembers the only frameset document, not any page that was subsequently called into a specific frame.

Additionally, some search engines are not optimized to follow links across frames. However, each of these disadvantages may be overcome through scripting. When planning a framed site to meet stringent accessibility guidelines, it is imperative to use the built-in accessibility features provided to make it possible for aural readers to understand how to process and read the site.



 < Day Day Up > 



Macromedia Studio MX Bible
Macromedia Studio MX Bible
ISBN: 0764525239
EAN: 2147483647
Year: 2003
Pages: 491

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net