home account info subscribe login search My ITKnowledge FAQ/help site map contact us


 
Brief Full
 Advanced
      Search
 Search Tips
To access the contents, click the chapter and section titles.

Platinum Edition Using HTML 4, XML, and Java 1.2
(Publisher: Macmillan Computer Publishing)
Author(s): Eric Ladd
ISBN: 078971759x
Publication Date: 11/01/98

Bookmark It

Search this book:
 
Previous Table of Contents Next



CAUTION:  

When using the reserved frame names, make sure that the character following the underscore character is lowercase. Otherwise, you are likely to see targeting behavior that you don’t expect.


Although the TARGET attribute is useful for targeting the effects of hyperlinks, you can use it in other HTML tags as well. Placing the TARGET attribute in a <FORM> tag instructs the browser to target the response from the form submission to the specified frame. This enables you to set up a search form in one frame and have the search results appear in a separate frame.

Another tag that takes the TARGET attribute is the <AREA> tag, which is used to define a hot region in a client-side imagemap. This permits the document associated with a hot region to be loaded into the frame of your choice.

Finally, you can also use the TARGET attribute with the <LINK> tag. <LINK> is used to establish links to files that provide supporting information to a browser on how to render a file. You can link a style sheet to a page for example, using the <LINK> tag.

Respecting the Frames-Challenged Browsers

If you create a document with frames, people who are using a browser other than Netscape Navigator 4.0 or Microsoft Internet Explorer 4.0 might not be able to see the content you want them to see because their browsers don’t understand the <FRAMESET>, </FRAMESET>, and <FRAME> tags. As a courtesy to users with frames-challenged browsers, you can place alternative HTML code between the <NOFRAMES> and </NOFRAMES> container tags. Any HTML between these two tags is understood and rendered by other browsers. A frames-capable browser, on the other hand, ignores anything between these tags and works just with the frame-related HTML.


NOTE:  You should also consider providing <NOFRAMES> content for browsers running on screens with a 640×480 monitor. Frames are difficult to use at that resolution.

Some users have a browser that can render frames, but the users dislike framed documents. For this portion of your audience, you should consider having a non-frames version of all your pages available (see Figure 7.8). This way, users who like frames can stick with them, and those who don’t like frames have a way to view the same content without being burdened with an uncomfortable interface.


When making framed versions of existing pages, don’t discard your non-frames content. Very often, you can use the non-frames HTML documents as the alternative content found between the <NOFRAMES> and </NOFRAMES> tags.


CAUTION:  

The <NOFRAMES> and </NOFRAMES> tags must occur after the initial <FRAMESET> tag, but before any nested <FRAMESET> tags.



FIGURE 7.8  Providing a non-frames version of your framed content is an important user courtesy.

Creating Floating Frames

Microsoft introduced the concept of a floating frame with Internet Explorer 3. You can think of a floating frame as a smaller browser window that you can open in your main browser window—much like the picture-in-a-picture feature that comes with many television sets. The same as with regular frames, you can load any HTML document you want into a floating frame. The primary difference is that floating frames can be placed anywhere on a page that you can place an image. In fact, you’ll find the HTML syntax for placing floating frames to be similar to that for placing an image.

You place a floating frame on a page by using the <IFRAME> and </IFRAME> tags. A browser that can do floating frames ignores anything between these two tags, enabling you to place an alternative to the floating frame (most likely text or an image) on the page as well. This way, browsers that don’t know how to render floating frames can ignore the <IFRAME> and </IFRAME> tags and act on what is found between them. The <IFRAME> tag can take the attributes summarized in Table 7.2.

Table 7.2 Attributes of the <IFRAME> Tag

Attribute Purpose

ALIGN=LEFT|RIGHT Floats the floating frame in the left or right margin
FRAMEBORDER=0|1 Controls the presence of the beveled border around the floating frame
HEIGHT=pixels|percent Specifies the height of the floating frame
LONGDESC=”url” Provides the URL of a document that gives a more detailed description of what’s in the floating frame; useful for non-visual browsers
NAME=”frame_name” Gives the floating frame a unique name so it can be targeted by hyperlinks
SCROLLING=YES|NO|AUTO Controls the presence of scrollbars on the floating frame
SRC=”url” Specifies the URL of the document to load into the floating frame
WIDTH=pixels|percent Specifies the width of the floating frame


Previous Table of Contents Next


Products |  Contact Us |  About Us |  Privacy  |  Ad Info  |  Home

Use of this site is subject to certain Terms & Conditions, Copyright © 1996-2000 EarthWeb Inc.
All rights reserved. Reproduction whole or in part in any form or medium without express written permission of EarthWeb is prohibited. Read EarthWeb's privacy statement.