advertisement
| HOW FRAMES WORK (and how to link within them) |
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 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 link Frontpage express 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 Frontpage express 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 create the pages which go into each frame with frontpage express. However it is important to learn how to link within frames Lets say you have a third page called page3.htm that you want to link to from page1 If you want it simply to open in the place of page1 like so simply create a hyperlink in Frontpage express 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 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. Things get a wee bit trickier...... You must specify it to do so so when creating link you must fill in the frame box to give a target frame. So you would select page3.htm as your open page and type the name of the target right frame (here right) in your (5) target frame box If you want open page3 in a new browser window so you get | | | + | |
You select page3.htm as your link but you need to type in the target frame box either _blank or _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 You select pageC.htm as your link but you need to type in the target frame box = "_top"
On rare occasions you might have opened a framed page into a page a frame of another If you create a link in one of these secondary frames (e.g. here 3 and 4) with the value "_parent" in the target frame box you will load that page into the original (parent) frame
|