![]()
IMPORTANT!! START HERE:
You've got your frames set up just the way you like them. Maybe they look like this page, with a contents area on the left, and a place on the right for all your stuff. So far so good! What are you going to ask next? I know... when you add hyperlinks, how can you make them go to different places? Here's an attempt to help!
The page you are looking at is actually 3 pages. Put another way, I had to publish 3 separate pages to get the effect you are looking at.
Page 1)The first
page is the Master Code Page that tells the frames where to go. The address of this
is:
http://www.roxydoll12.com/help/targetframe.html
If you type in this address at the top of your page, you'll come to this page,
which shows all the 3 frames put together
Page 2)The address for the page, which is the frame on the left, is: http://www.roxydoll12.com/help/targetleft.html If you type in that at the top of your page, you will only get the left frame.
Page 3)The address for the page, which is the frame on the right (the one
I am writing in now) is:
http://www.roxydoll12.com/help/targetright.html
If you type in this address, you will only get the right frame. Try it!
It's only when you also publish the master code page that the whole frames thing comes
together!!
With me so far? Good. In addition to an address, each page also has a name.
The complete Master Code Page (Page 1) for this frames page looks like this:
<html>
<head>
<title>
Frames Help!</title></head>
<frameset cols=
"158,*"> <frame name="contents" target="main" src="targetleft.html"> <frame name="main" src="targetright.html"> <noframes> <body> <p>This page uses frames, but your browser doesn't support them.</p> </body> </noframes></frameset>
</html>
The part of the html code that I will be explaining to you is the part that looks like this:
<
frameset cols="158,*"><
frame name="contents" src="http://www.roxydoll12.com/help/targetleft.html"><
frame name="main" src="http://www.roxydoll12.com/help/targetright.html">What is important is the html language that says frame name="contents" The name of the frame on the left is "contents." Similarly, the name of the frame on the right, the frame I'm writing in now, is "main." This is different from the ADDRESS of the frame. Remember this as I go on!
OK, there are basically four places you can have a link open up in. They are:
1. A smaller window that comes up over your page
2. A whole new page
3. A link that appears in the same frame page
4. A link that opens up in another frame page, say the page on the left.
THIS IS CONTROLLED BY A COMMAND CALLED TARGET. The target command in your html code tells the link where to open. But how do I do that, you ask? Read on...
Here's a hyperlink to my souvenir page. The address of the page is:
http://www.roxydoll12.com/help/example.html
FOR A NEW WINDOW
Say you want a new window to appear when someone clicks on that link, you would do this:
The page called "Example" pops up in a new window. Here is the command that does this:
<
a href="http://www.roxydoll12.com/help/example.html" target="_blank"><strong>Example</strong></a></font></p>This is what the code above means:
<a href="http://www.roxydoll12.com/help/example.html" This is the address for the hyperlink.
target="_blank"> This is the part of the html code that tells the link where to appear. So, target="_blank" is the command that opens up a hyperlink in a new window. On your page, put this command after the address for a hyperlink if you want it to be opened in a new window! Like this:
<a href="http://www.roxydoll12.com/help/example.html" target="_blank">
FOR A WHOLE NEW PAGE
Take my this page again as an example. I'm putting in another hyperlink to that page. But this time, it will pop up as a whole new page. You're going to have to press the back button on your browser to get back to this page, though (I'm warning you!)
Did it work? Yup. Here's the code that did that:
<
a href="http://www.roxydoll12.com/help/example.html" target="_top"><strong>Example</strong></a></font></p>What are you looking for? See if you can guess.. it's the "Target". Here the target is:
target="_top"
So after you type in the address of a hyperlink, if you want that hyperlink to open in a whole new page, you put in the command target=_top after the address of the hyperlink, like this:
<a href="http://www.roxydoll12.com/help/example.html" target="_top">
FOR A LINK THAT APPEARS IN THE SAME FRAME
You use this if you have a whole new page that you want to appear in the same frame you're working in when you click on a hyperlink. I made a new page:
http://www.roxydoll12.com/help/newmain.html
I'm going to make it appear in this frame. Click on the link below. It will open a new page in this frame:
Here's the code for that hyperlink:<a href="
http://www.roxydoll12.com/help/newmain.html" target="_self"><strong>Alexa's Globe</strong></a></font></p>Once again, look at the target command in the html code. To make a link appear in the SAME FRAME you write after the name of the hyperlink target="self"
FOR A LINK THAT OPENS IN A NEW WINDOW
This is the most confusing one. In this kind of hyperlink, the link opens up in another window on your page. It is especially useful for contents pages, where the link can be on the left, and the information on the right. Only attempt this if you are perfectly clear about what I've written above. It would be hard for me to even help you individually, since look at all the room it took me to get you this far :) All I can say is give what I told you above a try, and if you're very brave, plunge ahead with me into new ground. Click on the red hyperlink below:
If I did it right, a page should have appeared in the left hand frame with a pic of Reese Witherspoon on it. How did I do it? Once again, here is the html code line for the hyperlink above, which reads "Link Appears at Left"
<a href="http://www.roxydoll12.com/help/newcontents.html" target="contents">LINK APPEARS AT LEFT</a></strong></font></p>
The ADDRESS of the page that the
hyperlink refers to is:
http://www.roxydoll12.com/help/newcontents.html
When you clicked the hyperlink, the new page appeared in the frame NAMED contents, which is the name we gave to the left one. How did you get this? Go back to the html code for the Master Frames Page, which is:
<html>
<head>
<title>
Frames Help!</title></head>
<frameset cols=
"150,*"> <frame name="contents" target="main" src="targetleft.html"> <frame name="main" src="targetright.html"> <noframes> <body> <p>This page uses frames, but your browser doesn't support them.</p> </body> </noframes></frameset>
</html>
In the master code, the page is divided into two columns. Look at the line that begins <frameset cols= 150, *> The first column is 150 pixels wide, and the second one is marked with the *, meaning it is as wide as the rest of the page. The next line is where the NAME and SOURCE of the left frame are listed. The left frame is NAMED "contents". The ADDRESS of the page you want to show up as a new page in that frame named CONTENTS is "targetleft.html." The name of the frame is NOT the same as the address of the frame. All links that go on this page to the left hand frame must refer to the frame NAME, "contents" and to the ADDRESS of the new page that shows up in the frame.
When I want to have a new page appear in the frame NAMED contents, I write the following link. You DO NOT put this link in the Master Frames Page. The Master Frames page never changes once you set it up. You put the link on the page were the link is directed FROM. For example, following is a hyperlink in red ON THIS PAGE. It says: LINK APPEARS AT LEFT I want a new page to open up on the left when I click on the link. So I write the hyperlink for it in red ON MY PAGE 3, which is my html code for this page. The code for this link is as follows:
<a href="http://www.roxydoll12.com/help/newcontents.html" target="contents">LINK APPEARS AT LEFT</a></strong></font></p>
Notice that I have the ADDRESS (a href="http://www.roxydoll12.com/help/newcontents.html) and a TARGET (target="contents")
So the target when you want to send a link to the left frame named contents is:
target="contents"
You can name the frame anything you want, as long as the "name" and the "target" are the same!
*****If you have a contents page on the left,
and you want to send the links to this page, (and you are following me so far) go now to
the left frame and read the instructions there, starting at the red stars
(If somehow you've lost the left hand page, and all you see is Reese, click here and I'll take you back to the instructions!)
![]()