Using Frames essentially allows you to have 2 or more web pages open in the same window at the same time.
These 2 page are loaded into a parent page containing the frames (this is called the frameset)
For Example
Here we have 2 pages you have created page1.htm and page2.htm. We want to display both in the same window
1
1
2
2
page1.htm loads into the frame on the Left side (lets call it left) of the window and page2.htm loads into the Right frame (right). The window now has 2 areas called Frames which each contain a pages.
This window is created by a page containing code for the frameset (this sets up the size & name of each frame and what page intially loads in).
In order for you to see your frame you must open this page up (lets call this page Frame.htm)
Frames can be very useful. Many people use a set of frame to give a static portion to their pages (e.g containing header logo and side menu) whilst the content part is more dynamic and loads into a frame (thereby everytime you click on the menu the whole page doesn't have to reload just one frame)
However frames can cause some headaches in creating them in editors like composer that do not directly support them.
Other problems ensue when frames are looked at on different resolution monitors. Your browser download time will also be increased as all webpages apppearing in the frameset will have to be downloaded.Also if overused can ruin your site. Finally older browsers (before Netscape 3.0) do not support them
Frames are often not supported by editors such as Composer in WYSIWYG mode, as it cannot display them, although you can use the HTML editor to create them (see our page for this).
However, you can control the pages which go into each frame when a link is clicked.
Lets say you have a third page called page3.htm that you want to link to from page1
3
If you want it simply to open in the place of page1 like so
1
2
3
2
simply create a hyperlink in Composer on page1.htm to page3.htm
You can then carry on linking within that again so if you want to link page3
so another page2 appears in its place
2
2
Just create a link from page3 to page2.htm
If you want a link on the page1 side of the frame to open page3 in the place of page2 like so.
1
2
1
3
Things get a wee bit trickier......
Begin by creating a link in page1.htm as normal to page3.htm
Now click the Extra HTML../Advanced edit button
With composer 4.x in the box that appears
type in
target="right"
with 6.x things are a wee bit different.
Ensure (X) HTML attributes is selected
You'll need to select target from the Attribute(Y) pull down list and enter right as it's Value in the adjacent box
This tells the browser to open the new file in the frame called "right"
If you want open page3 in a new browser window so you get
1
2
1
2
+
3
You select page3.htm as your link but you need totype in the target as either target="_blank" or target="_new"
This will tell browser to open extra window(_blank is the newest standard and perhaps the best to use)
If you want the link to open page3 and replace Frame.htm without opening new window
1
2
3
You select pageC.htm as your link but you need totype in target="_top"
On rare occasions you might have opened a framed page into a page a frame of another
1
2
1
3
4
If you create a link in one of these secondary frames (e.g. here 3 and 4) with the value target="_parent", you will load that page into the original (parent) frame