PDA

View Full Version : Linking 1 frame to another


ionsurge
08-08-2002, 03:25 PM
How would I link something from one frame to another. So, if I had a main frame, and a title frame, when someone clicks on the title frame, the main frame changes to i.e. the home page.

Thanx.

boxer_1
08-08-2002, 03:28 PM
Link in title frame:

<a href="whatever.html" target="main">Open whatever.html in main frame from title frame</a>

Is this what you were looking for?

ionsurge
08-08-2002, 05:18 PM
What I am looking for exactly, is in the attachment. If anyone can help please do so.

What I need is in it, so please let me know if you can help.

Thanx.

ionsurge
08-09-2002, 11:40 AM
I am a relative newbie to HTML, ASP, and Java, and do not know how exactly I should implement that bit of coding, boxer_1, could you give me some sort of step by step guide to how I should put it in. My HTML files are labelled like this:

Index.html - Contains the two frames

Title.html - Has the heading, which I want to link to home.html, which is below.

home.html - This is where the home page is, so when someone clicks on "title.html", the bottom frame, "home.html" comes up.


Simple. but I know, poor diagram. :)

____________________
|~~~~~~~~~~~~~~~ |
|~~~~title.html~~~~~ | <-- This links to home.html.
|___________________|
|~~~~~~~~~~~~~~~ |
|~~~~~~~~~~~~~~~ |
|~~~~home.html~~~~~|
|~~~~~~~~~~~~~~~ | <-- I want this to change
|~~~~~~~~~~~~~~~ | when title.html is clicked.
|___________________|


I think that this should help you understand what I am looking for, so please, can someone help me.

Thank you.


ionsurge

____________________________

Visit my site! www.ionsurge.com (http://www.ionsurge.com)

boxer_1
08-09-2002, 01:07 PM
Ok, all you have to do to get your links to open in the frame you want is to target the name of the frame. Just for the sake of example, let's say you have 2 frames, one named top and the other named main. We'll say the frame named top is where the page title.html loads into (as in your example). We'll say that the frame named main is where home.html is loaded.

Now, let's say we have a link contained in the file title.html. Of course we're loading title.html into the frame named top. Say the link is to home.html and we want it to load into the frame named main. All we need to do is set-up the link contained in the file title.html like this:

<a href=home.html target="main">Go Home</a>

The important part is target=main. Since we have our 2 frames named, all we need to do is target the name of the frame we want the page to load into. The names to your frames are given on your index.html. Once you have the frames named, just target the one you want, regardless of what page (.html file) you want to load into whichever frame.

Does that help you more?

ionsurge
08-09-2002, 04:25 PM
That sure does help me, and you have helped me fix this.

You guys are geniuses. :)