Click to See Complete Forum and Search --> : HTML Frames
dgregor
07-04-2004, 09:20 AM
I just started this web class and want to insert a DHTML navigation menu into a frames page. They same to add some code into the body portion of the page. My textbook doesn't have any body section in the frame page, only a head section and framesets. If I add a body section, the page doesn't display. Can I add this code somewhere to have my navmenu display?
rhsunderground
07-04-2004, 10:00 AM
add the code in the body of the page that you want the menu on.
<
dgregor
07-04-2004, 01:37 PM
help!!
gohankid77
07-04-2004, 01:59 PM
Did you actually do what rhsunderground said? Put the code in the body of the actual page that you want the menu on. Not the page that defines the frames.
Example:
Incorrect - frames.html
<html>
<head>
...
</head>
<frameset...>
<frame src="page1.html">
<frame src="page2.html">
</frameset>
<body>
(code)
</body>
</html>
Correct - page1.html
<html>
<head>
...
</head>
<body...>
(code)
</body>
</html>
Understand?
The incorrect way basically says you have two frames. One is called "page1.html". But there is also a body tag. This confuses the browsers because you can't have a body and a frameset tag.
The correct way says your code should be in the body tag of "page1.html" because that is a frame not a page defining frames like "frames.html"
jdavia
07-04-2004, 02:50 PM
See if this helps you to understand.
Name it "index.html".
It uses percent to size each frame. Say you only have two frames, this is a simple Frameset.
<HTML>
<HEAD>
<FRAMESET COLS="25%, 75%">
<FRAME SRC="menu.html">
<FRAME SRC="page1.html" NAME="index">
</FRAMESET>
</HEAD>
</HTML>
Menu.html is the is the page with your DHTML navigation menu
-------------------------
Below is a simple menu page.
Note: Pages use "Target" to link or target them to the frameset above called "index.html".
<HTML>
<HEAD>
<TITLE> DHML Menu</TITLE>
</HEAD>
<BODY>
<center>
<TABLE BORDER="0" ALIGN="DEFAULT" WIDTH="18%">
CONTENTS
<p>l
<a href="page1.html" TARGET="index">Page One</a>
<p>
<a href="page2.html" TARGET="index">Page Two</a>
</center>
</BODY>
</HTML>
-----------------------
Below is a simple sample "Page One" page. named "page1.html" rename to page3, page4 or more, for other pages.
<html>
<head>
<title>(Type a title for your page here)</title>
</head>
<body>
Your data goes here.
</body>
</html>
You need to make all these frame pages to complete your project.
rhsunderground
07-04-2004, 02:56 PM
if those correct replies don't work, attach your code and we'll give it a look.