View Full Version : Opening pages in two frames with one link


Strider
03-10-2003, 09:51 AM
Sorry if the answer to this is already posted in the forum but I'm kinda in a hurry at the moment to look through them all I hope you won't mind!
I have a website with the main links on the left, and the right frame divided into top and bottom.
I would like to know how when I click on a link in the left hand frame I would like a page to open in the top, and a page to open in the bottom of the right hand frame

Thank you so much!

pb&j
03-10-2003, 11:59 AM
try this...

<a href="newpage1.html" OnClick="parent.NameOfSecondFrame.location='newpage2.html';" target="NameOfFirstFrame">
Click here
</a>

rxylindz04
03-10-2003, 05:19 PM
lissa has this in her frames sections

Strider
03-10-2003, 05:45 PM
pb&j - It doesn't quite work..

This is what I put in:

<a href="earlyffmenu.html" OnClick="parent.top.location='earlyffoverview.html';" target="bottom">
Final Fantasy I-V </a>


The link "Final Fantasy I-V" is on the left frame. When clicked, earlyffmenu.html is supposed to open in the bottom of the right frame, while earlyffoverview is supposed to open in the top of the right frame. At the same time.
And I dont think this is in Lissas tutorial I have read it thoroughly...

Am I still doing something wrong?

pb&j
03-11-2003, 03:08 AM
What happens exactly during the click currently? Do you have a link to the page in question?

It may have a problem with the word "top" being part of the listing. Could you try changing the frame name value and adjusting the code accodingly? Top is generally a reserved word that is used to symbolize the top most level of a javascript area. Thus having a frame named the same thing might be confusing the issue.

Strider
03-12-2003, 05:47 PM
I've changed the frame called "top" to "main" but still no luck its doing my head in..... :(
Heres the page that is going wrong.

http://www27.brinkster.com/ffgameguide/index1.html

MaGiCSuN
03-12-2003, 06:48 PM
You have targetted your links that appear on the bottom to "top" but you don't have a frame with the name "top"

Also i might be wrong, but as i read what you want to do i can understand of it that you want to have a top, rightside and bottom part, and a left side. That are 4 frames. You only have 3 in your code.

Love,
Mirna

Strider
03-13-2003, 12:38 PM
I am REALLY confused now.
I dont know if i have 3 frames or four..
i had left and right but then i divided right into top and bottom.
so it appears that I have 3.

The reason they are targetted to "top" is that pbs&j said i should change the frame name from top to something else so i called it "main" but it was called top before.

I wanted the two frames to change at once because it would be easier for my user. I want the link on the left to open the menu in the bottom right and a page in the top right...

I think im gonna give up for now but if anyone else wants to have a look and see whats up with my code and what i need to put in its at http://www27.brinkster.com/ffgameguide/index1.html

spicykiwi
03-23-2003, 08:47 PM
I understand the 'onclick' script, but I can't put 'onclick' a second time. How do I make a single link target 3 or more iframes?

peoshine
03-30-2003, 02:42 PM
Originally posted by pb&j
try this...

<a href="newpage1.html" OnClick="parent.NameOfSecondFrame.location='newpage2.html';" target="NameOfFirstFrame">
Click here
</a>

I tried this code, but somehow it opened one of my links into a new window.. the other link was ignored.

so which part should I replace with my url?
Say if I'm clicking on 'Home' and I want it to open 'apples.html' in the 'navi' inline frame and 'oranges.html' in the 'content' inline frame? The link I'm clicking on is outside the frames.

nb: I changed the html file names to avoid confusion..

pb&j
03-30-2003, 03:21 PM
try this...

<a href="apples.html" OnClick="parent.content.location='oranges.html';" target="navi">
Home
</a>

peoshine
03-31-2003, 09:15 AM
yay! thanx! it's working!

it didn't work before as i swopped the two file names..
anyway, one of my frames was wrongly labeled...

thanx a lot though!