links within frames

liunx

Guest
Hi!<br />
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!<br />
<br />
Becca<!--content-->If your right frame was named, "main" you would use this:<br />
<br />
<br />
<A HREF=http://www.webdeveloper.com/forum/archive/index.php/"page.html" TARGET="main">Text</A><br />
<br />
<br />
[Jona]<!--content-->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.<!--content-->Does your main-frame HTML page look like this?<br />
<br />
<br />
<!DOCTYPE HTML PUBLIC -"//W3C//DTD HTML 4.01 Frameset//EN"><br />
<html lang="en"><br />
<head><title>Title</title><br />
<meta http-equiv="Content-Type" content="text/html; charset=us-ascii"><br />
</head><br />
<frameset cols="150,*"><br />
<frame name="left" src=http://www.webdeveloper.com/forum/archive/index.php/"left.html"><br />
<frame name="main" src=http://www.webdeveloper.com/forum/archive/index.php/"main.html"><br />
</frameset><br />
</html><br />
<br />
<br />
The important parts are in bold.<br />
<br />
[Jona]<!--content-->my main frame html looks like this:<br />
<br />
<HTML><br />
<TITLE>title</TITLE><br />
<br />
<P><br />
<FRAMESET COLS="28%,72%" FRAMEBORDER="0" FRAMESPACING="0" BORDER="0"><br />
<FRAME SRC=http://www.webdeveloper.com/forum/archive/index.php/"links.html"><br />
<FRAME SRC=http://www.webdeveloper.com/forum/archive/index.php/"home.html"><br />
</FRAMESET><br />
<br />
<br />
<br />
</HTML><!--content-->Then that is your problem. You need to give your frames each a name.<br />
<br />
[Jona]<!--content-->That should be:<br />
<br />
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Frameset//EN"<br />
"http://www.w3.org/TR/html4/frameset.dtd"><br />
<html lang="en"> <br />
<head><title>Title</title> <br />
<meta http-equiv="Content-Type" content="text/html; charset=us-ascii"> <br />
</head> <br />
<frameset cols="150,*"> <br />
<frame name="navigation" src=http://www.webdeveloper.com/forum/archive/index.php/"left.html"> <br />
<frame name="main" src=http://www.webdeveloper.com/forum/archive/index.php/"main.html"> <br />
<noframes><div>A <a href=http://www.webdeveloper.com/forum/archive/index.php/"noframes.html">frame free version of this site</a> is also available.</div></noframes><br />
</frameset> <br />
</html><!--content-->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!<!--content-->Originally posted by Charles <br />
That should be:<br />
<br />
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. ;) <br />
<br />
[Jona]<!--content-->Originally posted by becca3872 <br />
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! <br />
<br />
You're welcome. :) <br />
<br />
[Jona]<!--content-->Originally posted by Jona <br />
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. ;) <br />
<br />
[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.<!--content-->Yes, Charles, you are correct. That is the way it is to be marked up.<br />
<br />
[Jona]<br />
<br />
&nbsp;<!--content-->
 
Back
Top