Log in

View Full Version : Using Frames



Freeman
03-23-2006, 03:18 PM
<html>
<head>
<title>Home Page</title>
<frameset>
<frameset rows="160,*">
<!-- Logo -->
<frame src="frame.htm">
</frames>
</html>

This frame is at the top of the page. I would like to have the links open in a frame underneath of this one. Here (http://campion.net/zzzz/index.htm) is what the page looks like so far. Thanks for the help, JF

Twey
03-23-2006, 04:20 PM
<html>
<head>
<title>Campion Academy Home Page</title>
<frameset>
<frameset rows="160,*">
<!-- Campion Logo -->
<frame src="frame.htm">

</frames>
</html>:eek:
</frames>?! And that markup is awful. Please, use a validator (http://validator.w3.org/check?uri=http%3A%2F%2Fcampion.net%2Fzzzz%2Findex.htm)! Personally, I'm surprised that page even works.
To answer your question: firstly, sort your markup out (hint: fix errors from the top down); then, give the target frame a name attribute, like so:
<html>
<head>
<title>Campion Academy Home Page</title>
<frameset rows="160,*">
<!-- Campion Logo -->
<frame src="frame.htm">
<frame src="otherframe.html" name="main">
</frameset>
</html>Then, in the links in the page displayed in the top frame, use target="name" like so:
<a href="page3.html" target="main">Page Three</a>

Freeman
03-23-2006, 04:42 PM
Wow. I didn't know i was talented enough to do that. I also didn't know that those tester things existed. Anyways. So If I want the link to target the frame below all I have to do is tell it to target that name?

Freeman
03-23-2006, 05:20 PM
I love you Tweey. Just one more question though. There us a borger around the logo frame. How do I get rid of that? Thanks alot for the help, JF

Twey
03-23-2006, 05:28 PM
I see you haven't validated your page yet, and that you've put the link in the wrong place. :)
<frame src="frame.htm" frameborder="0">

Freeman
03-27-2006, 03:55 PM
How do I make a page come up that dosen't load in the frame? If I could I would like to make it a page that pops up and is seperate from the others.

Twey
03-27-2006, 04:14 PM
<a href="..." target="_top">Click Here</a>
Or, for a new window:

<a href="..." target="_blank">Click Here</a>