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:
Then I tried to find out, why so many poeple (including me) hate frames. This is another list:
1. No chance for older browsersThis 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 bookmarkI solved this problem with my intopic-navbar. Do the following steps, if you want to bookmark a subpage:
ChaosYou can reproduce this brwoser-bug:
How is that possible?
You create frames with the tag <frame>, which has an attribute name ... <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....
HelpThere 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 monitorsThis 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:
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)!
©1999 by Pilif |
|