Unit 8. Using Frames (II)


Selecting frames

 

If you want to select the frames of a document you have to go to the Frames panel which can be opened through the Window menu. If the Frame option isn't in this menu, it may be in Others option. You can also open the Frames panel by pressing the combination of Shift+F2 keys.

The frames that are in the frame document are found in the Frames panel, and we can go through them by clicking on them in the panel. You can also select the frame Page by clicking on the border that sorrounds the frames.

Select the frames to edit the document they may contain.

Select the frames to specify the specific properties of each one of them.

 

Saving Frames

 

All documents that have frames must have a Page inside each one of them. This is why when you create a frame, new pages are loaded by default in each one of them (apart from the frame that has the original page).

These new pages can be replaced later by other existing pages as we'll soon see.

If you save the page that has the set of frames, each one of the pages included in their frames we'll be saved too.

It is not recommendable to save the frames for the first time using the Save all option, because we can make mistakes when naming the new files.

It's preferible saving each file (one by one) unless all the frames had an already existing page, because in this case the unique file that will have to be named will be the one that has the set of frames.

To save a file that has a set of frames, you have to previously select it.

To save each one of the documents, you just have to place the cursor on one of them and click on the Save button.

 

Setting up Frames

 

After selecting a frame through the Frames panel, its properties can be established through the properties inspector.

Each frame has a name assigned that can be changed through the Frame name option. The name cannot have blank spaces.

Src is the HTML file name that is displayed in the frame.

In Borders you can select a line that splits the frame from the rest of the frames. In case of showing the border, a color for this can be specified through Border color. You can also establish a width for the border through the Width option.

Scroll will indicate whether scrolling bars will be shown or not when the frame file cannot be completely seen.

If the No resize option is activated, it indicates that users won't be able to change the frame size in the browser.

The Margin width and Margin height set the separation between the content of the frame and its right-left and top-bottom borders.

If all the sets of frames are selected, then the Properties inspector will display the following options:

In Borders you can add a line to split the frame from the rest of the frames. In case of showing the border, a color for this can be specified through Border color. You can also establish a width for the border through the Width option.

The Column field (or Row) is used to set the frame size, and it can be introduced as Pixels, in Percent (of the window) or Relative (proportional to the rest of the frames).

You will usually use two frames, one of them with size in Pixels, which will contain the browser bar, and the other frame with a Relative size, to adjust it to the rest of the browser window.

Frame content

 

As you have seen, the frame content can be established through the Src field of the properties inspector.

When we work with frames, our aim is to load different files in at least one of them.

Through the Src field of the properties inspector, it's only possible to specify the file that will be loaded in the frame in first time, but we can change this later using links.

As you remember, in the hyperlinks unit we learnt the possible links destinies. Those destinies could be _blank, _parent, _self, and _top. Let's see again what are they used for. You now know how to work with frames and they will be easier to understand.

_blank:

Opens the file linked in a new browser window.

_parent:

Opens the linked file in the frame window that has the link or the set of main frames. As you know, the main frame is the frame where the initial file is and where the rest of the frames have been inserted.

_self:

Is the predetermined option. It opens the linked file in the same frame or window as the link.

 

Opening the linked file in the whole browser window means that the window frames will disappear when you open the link in it.

In addition to these destinies, you can also set the name of one of the frames in the Page as one of them, so the page will be loaded in that frame.

 

We can add all these destinies to any element of the Page that has any link, it can be a text, an image, an image map, a flash element, etc.

Thanks to this we can make our links work as we please, loading Pages in some of the frames, in a new window, in the whole window, etc.

This task can be difficult and complicated at the begining, but it leads to good final results.

teacherClick courses can be seen on the net using a top frame with pull-down panels.

To practice you can perform the Step by step exercise in Creating and configuring frames.

  Unit 8 exercise

  Unit 8 Test

  Go to the previous page page Content  Go to the nex page  

Page 8.2