Frames

Why frames?

This is a good question. I know that many poeple on this world hate homepages with frames. Me too. But on the other hand, this subpages are quite uesful. I can put the navbar in only one file and I have not to change 60(!) pages, if I only add one new subpage. But this is not all. Here a list with stuff that is good about frames:

  • Easy-to-handle navbar
  • Pages are showed during loading (no big tables over a whole page)
  • ...
For me, the scond point was the most important. I also has sometimes ago a layout with a big table and a small polling-script, which gave the user the possibility to decide if I should use frames or not. The reasult was about 100:10 for frames...

Then I tried to find out, why so many poeple (including me) hate frames. This is another list:

  1. No chance for older browsers
  2. Difficult to bookmark
  3. There is a big bug in browsers if there are frames with the same name (see later)
  4. Not optimal on small monitors
Mor contras than pros. Not good... But with my intopic-navbar, I succeded in fixing most of the poblems in the list, you can see at the top. In one point (monitor) I even saw, that frames help the visitor...

1. No chance for older browsers

This is true, but not on all the pages. In HTML, there is a tag named <noframes>, which allows to wirte some HTML-Code into brwosers that does not support frames. Most of pages of commectional companies display here only a small message which invites the visitor to get a newer browser.

My page also does so, but the user has a full-features linklist and full access to the sitemap. So she/he can visit my page with older browsers alo.

2. Difficult to bookmark

I solved this problem with my intopic-navbar. Do the following steps, if you want to bookmark a subpage:

  1. Click on the button "New Window" (N) or "Fullscreen"(U). You will have the page in a clean, no-framed-browserwindow..
  2. Bookmark the page (Ctrl-D may help you).
  3. If you wish to call the subpage, open your bookmark. To open the navbar agin, please use teh button "reactivate Frameset" (F).
    This technique works, thanks to CGI on all browsers on the web. You do not have to activate JavaScript!

Chaos

You can reproduce this brwoser-bug:

  1. Read the steps on this list and finally, click on teh link at the bottom.
  2. The page on the bottom is the homepage of my school. The Mainframe is named mainframe, the problem: the big frame under the title (which contains the homepage of my school is also named mainframe
  3. Click on a button in the navbar of my school.
  4. Click on a second... (or better: try it)
  5. Use the link in the title to come back here
Unfortunately the page of my school got redesigned. The example that was provided here does not longer work.

How is that possible?

You create frames with the tag <frame>, which has an attribute name
With the help of this name, you can redirect links into a subwindow: The Tag to creatge links has an attribute named target which does this for you. Here some sourcecode from the page of my school:

 ...
 <a href="html/schulplan.htm" target="mainframe"><img src=".."></a>
 <a href="html/termine.htm" target="mainframe"><img src=".."></a>
 <a href="html/sov.htm" target="mainframe"><img src=".."></a>
 ...
These are links of the navigation-bar. All the links point to the frame named "mainframe". This measn, that all the tragets of links in the nav-bar are opened in the big subwindow, named mainframe.
And this is the problem:
 ...
 <frameset  rows="60,*">
     <frame name="45top33" src="cdemo.html"">
     <frame name="mainframe" src="/hopro/">
 </frameset>
 ...
This was part of my homepage that created the samall title (with the stupid texture, a titel and a link). We can see: Two times "mainframe". Once in the page of my school and once in my homepage.

The new browsers have a problem with that. If there is a link opened which tragets a frame which name exists more than one, the open the page in the first frame. The first "mainframe" is that of my page, so every link on my school will destroy the layout....

Help

There are some possibilities to fight against this problem: The best is to open all the external links into a new window (target="_new") or into the same window, but without frames (target="_top"). If you wish to give the user a backreference to your page, you can do that with the help of a small(!!) javascript-window, wich contains a button to lead the user back.

This way, you cannot create the problem. To avoid beeing in frames of other pages (which possibly have some frames that have the same name as yours), you can use one of the following tricks:

 <script language="JavaScript">
 <!--
 if (self != top) {
  top.location.href=window.location.href;
 }
 //-->
 </script>
This code in the file which setes the frames, will reload the page in a plain window, if there are some frame set.

But what to do, if a browser does not support JavaScript? Unfortunaly, it is not posible to turn the frames out automatically, but you can create a link, which does this on a simple click:

 <a href="#" target="_top">Click here!</a>
If all this does not work, you can fix the bug on another way: Use names of frames that are not on other pages! I created my names with a small C-Program which randomized them. Please notice: The longer the names are, the better you are prevented from the bugfix!

4. Small monitors

This is a problem that not only pages with frames have. On a resolution of 640x480, many of the pages are too small, because the navbar takes too much of place. It is difficult to solve this problem as easy as the ones above, but here, you will find a list, what to do if you have a small monitor, or if you wish to create a page that looks good on samll monitors:

  • Use a big resolution instead of many colors. Use the table on the bottom to see, which resolution fits best to your monitor:

    MonitorAt leastBestMaximum
    14''640x480640x480800x600
    15''640x480800x6001024x768
    17''800x6001152x8821280x1024

    Maximum means, that this resolution my work, but may be too small and unsharp. But monitors that support these resolutions may exist... Try it out!

  • If you have a monitor of 14'', you should possibly think of buying a newer model. On 640x480 it is under Windows even not possibly to display an A4-Page without horizontal scrolling!
But you as webmaster can also do something:
Try to give the possibility to turn of the navigation-bar!!!
How? Use frames and write an Intopic-Navbar linke mine (or download it form this page)!


--This page was last modified on: 05.05.2000 09:46:10 MET--

©1999 by Pilif
 NUF L IS 


 Related Topics

 Internet Links