|
To access the contents, click the chapter and section titles.
Platinum Edition Using HTML 4, XML, and Java 1.2
The <IFRAME> tag has three required attributes: WIDTH, HEIGHT, and SRC.WIDTH and HEIGHT specify the width and height of the floating frame in pixels or as a percentage of the browser screens width and height. SRC tells the browser the URL of the document to load into the floating frame. Thus, your basic floating frame HTML looks like this: <IFRAME WIDTH=250 HEIGHT=112 SRC=<http://www.server.com/floating.html>> Text or image-based alternative to the floating frame </IFRAME> In addition to the three required attributes, the <IFRAME> tag takes several other attributes that give you good control over the floating frames appearance. These include
Using Hidden FramesA technique that has emerged recently involves the use of hidden frames. Hidden frames are frames that have no size and, therefore, are not visible to a user. You might set up a hidden frame with code such as <FRAMESET ROWS=30%,70%,*> <FRAME SRC=frame1.html NAME=frame1"> <FRAME SRC=frame2.html NAME=frame2"> <FRAME SRC=frame3.html NAME=hidden_frame> </FRAMESET> This creates a frameset with three rows. The first row has a height equal to 30% of the browser window height, the second row a height equal to 70% of the browser screen, and the third row a height of whatever is left over. However, because the entire browser window height is consumed by the first two rows, the third row has a height of zero and is hidden from view. You may be asking: if a frame cant be seen, what good is it? The answer is that it is good for behind-the-scenes kinds of activity such as JavaScripting. When Netscape released its NetHelp online help package with Navigator 4, it used JavaScript tucked away in hidden frames to control aspects of the NetHelp interface such as the processing stack, activity tracking, and error handling. JavaScript code for all these functions is read into a hidden frame named SystemFrame, and a NetHelp application is able to make calls to this frame to invoke script code when needed. Another use of hidden frames is in applications developed in ColdFusion or Active Server Pages. With either technology, an HTML document is dynamically generated and returned to the browser. Occasionally, it is appropriate to build a hidden frame into the HTML document that contains state information that cannot be stored as a cookie or on the server. See Active Server Pages and VBScript, p. 835. See Using ColdFusion, p. 879. Developing Framed Layouts in an HTML EditorWhen the frame tags first came on the scene, many content developers were challenged by their complexity. Things were made worse by having to do all the code by hand and without the luxury of any kind of WYSIWYG preview capability. Fortunately, most top-notch content development programs now include some support for authoring framed documents. This chapter closes with a look at three such programs. Microsoft FrontPage 98The FrontPage 98 Editor has its own Frames menu from which you can initiate just about any frames-related task. To get started with a framed layout, choose Frames, New Frames Page to call up the dialog box you see in Figure 7.10. Here you find a list of 10 preconfigured framed layouts that FrontPage can set up for you automatically.
As you highlight the different selections, you see a preview of how each breaks up the browser screen. After you find the one you want, click OK and the framed layout is loaded into the Editor. Figure 7.11 shows the Header, Footer and Contents layout.
|
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. |