Yet Another Question (re: Frames) from the HTML-Impaired

How does one reference the contents of a second page and display it above or below text that is hard-wired onto the current page? i.e., I’m on a page, let’s call it ThisPage.html, and I have some text:
blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah

and below it I want a frame containing the contents of a second page, let’s call it ThatOtherPage.html.

So I stick in something like this below the blah blahs but above the </BODY> close tag:

So I load ThisPage.html in my browser and I get: nothing except the contents of ThatOtherPage.html. I’m missing all my blah blahs!!

NOTE: ThisPage.html is a page generated via CGI as opposed to it being a static web page. If what I’m doing ought to work, otherwise, it is possible that embedding a second page via frame isn’t supported by the CGI or something, I guess. I don’t expect y’all to know that* one way or the other, just hoping that there’s a plain-vanilla HTML reason why it isn’t working, one that can be fixed by adding or moving a tag.

  • but just in case someone does, the CGI is courtesy of Witango and ThisPage.html exists as a Search Results function’s HTML.

Sorry, A standard document has one HEAD, and one BODY. A frameset document has a HEAD and a FRAMESET in place of the body.

You’ll have to create a new frameset document that refers to both ThisPage.html and ThatOtherPage.html

It may not be fair, but it’s the law.

You only specified one frame source. Typical frames are implemented using an index.html that only contains the frame descriptors, and the contents of each fram are in separate .html files, like this:



<HTML>
<HEAD>
<FRAMESET ROWS=\"60,*,75\" BORDER=0>
<FRAME SRC="header.html" scrolling=no border=0>
<FRAME SRC="main.html" NAME="main">
<FRAME SRC="bottom.html" NAME="form">
</FRAMESET>
</HEAD>
<BODY>
</BODY></HTML>


Which would give you three frames arranged from top to bottom. Stuff inside the body tag is only going to be visible if you implement a framefree page for, say, WebTV broswers or other frame-incompatible browsers.

I don’t like frames, or iframes for that matter, but anyway…

Like Bill H. said, you’re not allowed to have <frameset> and <body> in the same document.
You could create another file describing your frameset like so:
myframeset.html:



<html>
<head>
<title>hoohaa</title>
</head>
<frameset rows="60%,40%">
	<frame src="ThisPage.html">
	<frame src="ThatOtherPage.html">
</frameset>
</html>


But for your use, using an iframe would be easier. Observe :slight_smile:
ThisPage.html:



<html>
<head>
<title>this is ThisPage.html</title>
</head>
<body bgcolor="#eeeeee">

<p>blah blah blah blah blah blah blah blah</p>
**<iframe src="ThatOtherPage.html" width="100%" height="100" scrolling="auto" frameborder="0">**
(text placed here will only be visible to broswers that don't support the iframe tag)
**</iframe>**
<p>Ahh.. back to ThisPage.html again.</p>
</body>
</html>


-creating a little “window” with the contents of ThatOtherPage.html just below the blah’s, and you don’t have to create a frameset file.

Iframes don’t work in Netscape very well. I believe they’re IE specific or something.

Not certain on that, I just know it was heavily suggested to me once not to ever use them ever.

Netscape, at least the older versions, has a tendency to funk up a lot of standard things. <iframe> is not IE specific, and the code I pasted above will pass the w3c html validator provided you insert
<!DOCTYPE html PUBLIC “-//W3C//DTD HTML 4.01 Transitional//EN”>
or
<!DOCTYPE html PUBLIC “-//W3C//DTD XHTML 1.0 Transitional//EN”>
-in front, and remove the bgcolor part of the body tag.

http://www.w3schools.com/xhtml/xhtml_reference.asp
http://www.w3.org/TR/REC-html40/present/frames.html
But I agree… frames are evil :slight_smile:

Thank you, thank you esp!

Never heard of an iframe before, but it works nicely. So far I’ve only tried it in iCab, but chances are good that if iCab will play nicely with it, other browsers will too.

I couldn’t use frames because I need dynamic information/function calls which draw upon FileMaker database fields, and Witango won’t let you load one of its dynamic pages as a frame of another, nor will it let a static web page load one of its dynamic pages.

The contents of ThatOtherPage is actually an intermittently-changing EULA or confidentiality agreement, and I don’t want to be selecting deleting and pasting new HTML right into the dynamic CGI stuff in Witango every time they want to modify the agreement text!

thanks again.