Click to See Complete Forum and Search --> : links within frames


becca3872
06-27-2003, 12:47 PM
Hi!
I am pretty new at frames and I'm making a website. I have just one frame separating my main page. On the left column I have a list of the links that you can click on that open up the other pages of the site. But instead of opening a new window, I want that page to open up on the right hand side of the page, leaving the left hand side just the same. I've tried targeting to the page but it doesn't seem to work. Help!

Becca

Jona
06-27-2003, 12:54 PM
If your right frame was named, "main" you would use this:


<A HREF="page.html" TARGET="main">Text</A>


[Jona]

becca3872
06-27-2003, 12:59 PM
That's what I have. When I click on the link, a new browswer window opens. I have to be doing something wrong! I just don't know what.

Jona
06-27-2003, 01:02 PM
Does your main-frame HTML page look like this?


<!DOCTYPE HTML PUBLIC -"//W3C//DTD HTML 4.01 Frameset//EN">
<html lang="en">
<head><title>Title</title>
<meta http-equiv="Content-Type" content="text/html; charset=us-ascii">
</head>
<frameset cols="150,*">
<frame name="left" src="left.html">
<frame name="main" src="main.html">
</frameset>
</html>


The important parts are in bold.

[Jona]

becca3872
06-27-2003, 01:05 PM
my main frame html looks like this:

<HTML>
<TITLE>title</TITLE>

<P>
<FRAMESET COLS="28%,72%" FRAMEBORDER="0" FRAMESPACING="0" BORDER="0">
<FRAME SRC="links.html">
<FRAME SRC="home.html">
</FRAMESET>



</HTML>

Jona
06-27-2003, 01:06 PM
Then that is your problem. You need to give your frames each a name.

[Jona]

Charles
06-27-2003, 01:09 PM
That should be:

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Frameset//EN"
"http://www.w3.org/TR/html4/frameset.dtd">
<html lang="en">
<head><title>Title</title>
<meta http-equiv="Content-Type" content="text/html; charset=us-ascii">
</head>
<frameset cols="150,*">
<frame name="navigation" src="left.html">
<frame name="main" src="main.html">
<noframes><div>A <a href="noframes.html">frame free version of this site</a> is also available.</div></noframes>
</frameset>
</html>

becca3872
06-27-2003, 01:09 PM
Thank you thankyou!! That did it! I told you I was fairly new with frames!! But I named the frames and now it works! Thanks so much!

Jona
06-27-2003, 01:11 PM
Originally posted by Charles
That should be:

Since the HTML shown was irrelevant to the question, I gave a quick and simple outline just to show the need for the name attribute--I did not suggest that the code be used in its entirety. ;)

[Jona]

Jona
06-27-2003, 01:12 PM
Originally posted by becca3872
Thank you thankyou!! That did it! I told you I was fairly new with frames!! But I named the frames and now it works! Thanks so much!

You're welcome. :)

[Jona]

Charles
06-27-2003, 01:15 PM
Originally posted by Jona
Since the HTML shown was irrelevant to the question, I gave a quick and simple outline just to show the need for the name attribute--I did not suggest that the code be used in its entirety. ;)

[Jona] Fail enough. But Becca being new to the world of FRAMEs, and likely to HTML as well, I though that it would be well to demonstrate what a valid FRAMESET looks like.

Jona
06-27-2003, 01:16 PM
Yes, Charles, you are correct. That is the way it is to be marked up.

[Jona]

&nbsp;