[luau] HTML Frames & browser problems
beesond001 at hawaii.rr.com
beesond001 at hawaii.rr.com
Mon Apr 8 17:31:06 PDT 2002
Rodney,
I don't have my HTML book handy, but here is what I think. I don't
believe that you have defined a right frame in your main.htm file. Some
browsers, especially the later editions can figure this out by
themselves, whereas Netscape's default behavior is to look for the
TARGET="right", and if there is not a "right" then it automatically opens
a new browser window, to create the "right" window and then displays the
content.
Just below I have attached my own frames sources that I use for a web
page at work. You should see three files here, one for the frame
document itself, and one for the right side that I have called "Dynamic",
and one for the Table Of Contents (left frame). The text of the files
follows below.
My first file just sets up the frames, I think the key difference between
mine and yours is the line "<BASE target="Dynamic"> <!-- Open the
Dynamic.html page in the right frame by default. -->" this line tells the
browser to use the "Dynamic" window as the default to open the new content.
I didn't see that line in your file, I may have missed it. Also, the
lines I have included:
<frameset cols="26%,*">
<frame NAME="Contents" src="TableOfContents.html" target="Dynamic" >
<frame scrolling="yes" NAME="Dynamic" src="Dynamic.html" >
may help cause the browsers to behave in a more predictable way.
***************** opsFrames.html ********************
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN">
<html>
<head>
<title>Director of Operations</title>
<BASE target="Dynamic"> <!-- Open the Dynamic.html page in the right frame
by default. -->
</head>
<!-- Future vision: Create a framed window with
- a frame that stretches across the top containing the group default top
of pages
- a contents frame on the left that takes you to major sections of the
web page
- a main viewing window for wiewing contents.
end comments-->
<!-- for now, just use a table of contents on the left, and a main view
frame on the right. -->
<frameset cols="26%,*">
<frame NAME="Contents" src="TableOfContents.html" target="Dynamic" >
<frame scrolling="yes" NAME="Dynamic" src="Dynamic.html" >
<!-- The scrolling atribute above is set to auto,
I think a Netscape only value. You may need to check with IE.... -->
<noframes>
<p>
This document requires a frames capable browser.
Point your browser to the Table of contents to see what's here.
</p>
<br>
<A HREF="./TableOfContents.html">Table of contents</A>
</noframes>
</frameset> <!-- End of Frameset -->
</html>
**************** end file *********************
This just sets up the stuff that you see in the left frame...
Note that there are a few lines like this one: <a
href="http://www.transcom.mil" target="TRANSCOM Home"> US TRANSCOM Home </a>
that define the target as something other than "Dynamic." This causes the
browser to search for the window named "TRANSCOM Home" and if it can't find
it, to create one... (I did that on purpose for a few selected pages.)
***************** TableOfContents.html ********************
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN">
<html>
<head>
<title>Contents</title>
<base target="Dynamic"> <!-- Send all the selected pages to the right
frame.-->
</head>
<!-- This page will be the left sidebar that you can choose the different
content pages from -->
<h2>Contents</h2>
<a href="https://amogweb.hickam.af.mil"> Group Home Page</a>
<p>
<a href="https://amogweb.hickam.af.mil/TR/air.htm"> DOZ page</a>
</p>
<p>
<a href="https://amogweb.hickam.af.mil/CK/contract.htm"> DOY Page</a>
</p>
<p>
DOC Page (Under construction)
</p>
<p>
<a href="https://amogweb.hickam.af.mil/LG/logistics1.htm"> LG Page</a>
</p>
<p>
<a href="ASWG.html"> Aircrew Stabililty Working Group</a>
</p>
<p>
<a href="./MissionManagementLinks.html"> Mission Management Links </a>
</p>
<!-- Align Transcom and AMC pages right so they are shifted in the
sidebar.
Link both AMC and Transcom home pages with the "target" attribute
set to a new window so these sites open in a new and separate window
instead of the default frame "Dynamic." -->
<p align=right>
<a href="http://www.transcom.mil" target="TRANSCOM Home"> US TRANSCOM Home
</a>
</p>
<p align=right>
<a href="https://amc.scott.af.mil" target="AMC Home"> AMC Home </a>
</p>
<p>
<a href="./WeatherLinks.html"> Weather Links </a>
</p>
<p>
<a href="./OfficeProjects.html"> Office Projects </a>
</p>
<p>
<a href="./ITVSum.html"> ITV Summary for Missions Not in GDSS/GTN </a>
</p>
<p>
<a href="./OffDocs.html"> Phone Numbers and other Useful Office Documents
</a>
</p>
<p>
<a href="./Briefings.html"> Briefings </a>
</p>
<p>
<a href="Dynamic.html"> Back to DO Home page</a>
</p>
<p>
<!-- Insert a link to a favorite editor.... -->
<a href="http://www.vim.org" target="Dynamic"><IMG
SRC="./Graphics/created.with.vim.gif" ALT="This Site Created With ViM"
width="128" height="38"></a>
</p>
</html>
**************** end file *********************
This is my right side frame and is the default when the web page loads
up.
**************** Dynamic.html *********************
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN">
<HTML>
<HEAD>
<!-- This is the default document for the Right Side Viewing Window.
It is named "Dynamic.html" because its' contents are replaced
dynamically as the user selects links from the table of contents
window on the left....
End Comments -->
<TITLE>Dynamic.html</TITLE>
</HEAD>
<BODY BACKGROUND="./Graphics/MontageSmall.jpg" BGCOLOR="#000000"
LINK="#FFFF00" ALINK="#0000FF" VLINK="#808080" TEXT="#FFFF00">
<!-- Move the headings down a little bit on the page... -->
<br>
<br>
<br>
<!-- End - Move the headings down a little bit on the page... -->
<CENTER><H1>Welcome to the DO Home Page</H1></CENTER>
<!-- Office Address here -->
<CENTER><h2>715 AMOG/DO</h2></Center>
<CENTER><h2>DSN 315-449-7398</h2></Center>
<CENTER><h2>FAX DSN 315-449-6018</h2></Center>
<!--
<IMG SRC="./Graphics/C130USAFA.jpeg" ALT="C-130 Over USAFA" width=450
height=350>
--> <!-- Coment out this image for now... -->
</BODY>
</HTML>
**************** end files *********************
Sorry for the verbose reply, I hope that something I have offered here is
useful. BTW, I have found that if you write code that works for
Netscape, it pretty much works OK for that other browser. This is
definitely not true the other way around as that other browser tends to
extend the HTML command set quite liberally.
Good Luck,
Ben
More information about the LUAU
mailing list