please dont rip this site

AOLpress Logo

Creating pages

Creating frames
Frames let you divide a page into sections. For example, the frame on the left contains links to the main headings in this page.

When you work with frames, you are actually working with one page in each frame and one "Frameset" page that stores information about where the frames are and what they should contain when the Frameset page is first loaded.

So, a window with two frames (like this one) actually uses three pages: one Frameset page and a separate page in each frame.


Creating frames

If you want to use frames (even if you already have the pages you want to put in the frames), the first step is to create a new "Frameset" that defines the frame locations and sizes. Then, you can follow the instructions for Editing pages in frames to put your pages into the new frames.

   Try it now:
  1. Choose File New New FrameSet. You will see a new FrameSet with a red outline. This FrameSet is actually a page that contains one frame. The single frame contains another page.
  2. To add a frame: Move your mouse cursor to one of the page margins (you can do it in this page or in the new Frameset page you created). When your cursor looks like the one to the right (a single-headed arrow pointing in any direction), hold down your mouse button and drag across or down the window to create another frame.
  3. Notice that after you create a frame, the outline around the window is magenta. This means the Frameset is selected instead of a page in the Frameset.(You can also select the Frameset by choosing FormatFramesSelect Frameset or by clicking once on a frame border when your cursor looks like the double-headed arrow below.)
  4. With the Frameset selected, undo the last change you made to the frames by choosing EditUndo. (When a frame is selected, it is outlined in red, and choosing EditUndo undoes the last change you made within that frame.)
  5. To resize a frame, move your mouse cursor to a frame border so that your mouse cursor looks like the one to the right (a double-headed arrow). Then, drag the border to resize the frame.
  6. Another way to resize a frame is to put your cursor in a frame and choose FormatFramesFrame Size. You can give a frame a height or width in pixels, in percent of the total window size, or in units relative to the other frames.
  7. To remove a frame, move your mouse cursor to the frame border the same way you did to resize the frame. This time, drag the frame border all the way to the frame border next to it or to the edge of the page. (Or, you can put your cursor in a frame and choose FormatFramesDelete Frame.)
  8. AOLpress will ask if you intended to destroy the frame. Click Yes to remove the frame. (You cannot remove the last frame from a Frameset page.)
Add and remove frames to the Frameset as much as you like. Remember, you can undo your changes by selecting the Frameset (so that the window is outlined in magenta) and choosing EditUndo. Or, you can undo all your unsaved changes by selecting the Frameset and clicking the Reload button in the toolbar.


Putting pages in frames

You can edit the contents of frames as you would edit any other page with AOLpress. The frame you are editing is the one that is outlined in red.

When someone links to your frame outline, which pages should appear in each frame? Once you decide this, you can put these pages in your Frameset.

   Try it now:
  1. Add an extra frame to this window by dragging the frame border at the bottom of the left column up.
              From this:
     

                

                 To this:
       

                

       
       
  2. Put your cursor in the new frame you created.
  3. Choose FormatFramesFrame Info. The Frame Info window that opens lets you control this frame.
  4. Click the Browse button to the right of the URL field. Select the testfram.htm file in the same directory where this tutorial is stored and click OK.
  5. Name the frame by typing "myframe" in the Name field. You will use this name to create links that put pages in this frame.
  6. Click OK to apply your changes and open testfram.htm in your frame.

Another way to put a page into a frame is to follow these steps:
  1. Select the frame into which you want to put a page.
  2. Use FileOpen to open a separate window containing the page you want inside the frame.
  3. Use your mouse to drag the web icon (the one to the left of the Location field below the toolbar) into the frame you selected.



Saving frames

After you put a page into each frame, you save the Frameset and the pages it contains. The pages in the frames when you save the Frameset will be the pages that appear in the frames when someone loads your Frameset page.

Remember that when you work with frames, you are actually working with one page in each frame and one Frameset page to store the information about where the frames are and what they contain when the Frameset page is first loaded.

For example, notice that when your cursor is in this frame, the Location field below the toolbar says this file is frametut.htm. When your cursor is in the left frame, the Location field says the file is frametoc.htm. And, when you select the Frameset for this window, the Location field says the file is frames.htm.

When you save the contents of a frame, the frame layout and the contents of the other frames are not  saved automatically. So, you need to save each one separately. (Or, you can let AOLpress prompt you to save them when you close the window.)

   Try it now:
  1. To save the contents of a frame, put your cursor in that frame and choose FileSave.
  2. To save the frame layout, select the Frameset (so that the window is outlined in magenta) and choose FileSave. The Frameset now contains references to the pages currently shown in the frames.

Another thing to remember when you use frames is that some older Web browsers do not support frames. AOLpress lets you see and edit what people using these browsers will see by hiding the frames.
   Try it now:
  1. Choose FormatFramesHide Frames. You'll see what this Frameset page looks like to people who use browsers that do not support frames. (The text you see when you hide frames is stored in frames.htm--the Frameset file that defines the frame outlines.)
  2. You can edit the page you see as you would edit a normal page. For example, you might want to cut and paste the contents of your main frame into the window you see when you hide frames.
  3. To see frames again, choose FormatFramesShow Frames.


Linking to frames

If you want a link to show a page in a particular frame, you use the name you gave the frame as the "Target Frame" in the link. If you don't choose a Target Frame, a link displays the new page in the same frame that contained the link.

For example, the left frame in this window is called "toc" (for Table of Contents) and the right frame is called "main". To create a link that displays a different page in the left frame, follow these steps:

  1. Highlight the word "Test" in the right column.
  2. Choose ElementLink.
  3. Type testfram.htm in the Link to Page field.
  4. In the Target Frame field, select "toc". (The other choices in this list are explained below.)
  5. Click OK to create the link.
  6. Click on the link you just created to test it.
  7. You can click the Back button in the toolbar to return to the Table of Contents for this page.
   Try it here:
Test a link to the left frame.

You can also select a Target Frame when you create links in an image map, when you check links, and when you select a form handler. (The target for a form handler determines which frame will display the results of the program the form runs.)

In addition to the names you give to your frames, there are some special frame names you can choose from (click the Back button in the toolbar to return to this lesson after you test these links):

  • _blank (test): Opens another page window and displays the linked page in that window. Each time someone clicks on link to the _blank frame, a new window opens, even if that page is already open in a separate window.
  • _self (test): Puts the linked page in the same frame that contains the link. This also happens if you don't select any Target Frame for a link. You can use the back button in newer browsers to move back though pages you have visited in a frame.
  • _top (test): Removes the frames from your page windows and displays the linked page. For example, if you link to another Web site, you should use the "_top" target so the other Web site won't be displayed inside your frame layout.
  • _parent (test): Puts the linked page in the frame that contains the current frame. Unless you have a complex frame layout, this is usually the same as the _top frame.
  • Any other name (test): Puts the linked page in a new window. (Netscape and Internet Explorer will reuse the new window if the reader leaves the window open and later follows a link with the same target name.)


For more information, see the chapter on frames in the AOLpress User's Guide.

In the next lesson you'll learn how to use MiniWebs to organize and manage your Web pages.

Don't forget to use FileSave to save your changes to this frame. Also, select the Frameset and use FileSave to save your changes to the Frameset.


HomeTOCNextGlossaryIndex
[ Home | Contents | Previous | Up a Level | Next | Glossary | Index ]
Copyright © 1997 America Online, Inc.

file: /Techref/language/html/HELP/tutorial/frametut.htm, 18KB, , updated: 1997/3/23 18:29, local time: 2024/6/20 22:06,
TOP NEW HELP FIND: 
3.236.116.27:LOG IN

 ©2024 These pages are served without commercial sponsorship. (No popup ads, etc...).Bandwidth abuse increases hosting cost forcing sponsorship or shutdown. This server aggressively defends against automated copying for any reason including offline viewing, duplication, etc... Please respect this requirement and DO NOT RIP THIS SITE. Questions?
Please DO link to this page! Digg it! / MAKE!

<A HREF="http://www.massmind.org/techref/language/html/HELP/tutorial/frametut.htm"> AOLpress: Creating links</A>

After you find an appropriate page, you are invited to your to this massmind site! (posts will be visible only to you before review) Just type a nice message (short messages are blocked as spam) in the box and press the Post button. (HTML welcomed, but not the <A tag: Instead, use the link box to link to another page. A tutorial is available Members can login to post directly, become page editors, and be credited for their posts.


Link? Put it here: 
if you want a response, please enter your email address: 
Attn spammers: All posts are reviewed before being made visible to anyone other than the poster.
Did you find what you needed?

 

Welcome to massmind.org!

 

Welcome to www.massmind.org!

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

  .