• This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn more.

Is there a way to get one link to change two frames?


I have an html question and wanted to know if this is possible. I am creating a web page that would contain 3 frames. To make this easy I will number the frames in the example below:

  1. One would be the left column; this would be used for links to various sections of the documents.
  2. One would go across the top; this would be used to show the topic of what general link they are currently viewing.
  3. The final frame would be the main page in the center.
Here is the problem though; I would like to make it so that when I click a link from frame 1. it will not only change frame 3. but it will also change frame 2. so that it reflects a title with the new topic presented in frame 3.

I guess what I want to do is have a clicked link change two frames to two different pages.

Is there an easy way of doing this?

If not, is there a way to make it so that when I click a link from frame 1 it will load a page into frame 3, and when frame 3 loads it will somehow send a command to change the title in frame 2 (or automatically on load send a link to frame 2 I guess). Would this be a better solution? Sorry lol brainstorming as I write this...

I'll try to experiment a little on my own but any input on how I can achieve this would be great. Thank you in advance.


OSNN One Post Wonder
I'm not very good with web programing, but I gues that you could ad an OnLoad event to the frame that you link to that would open a new page in the other frame.
I think your right, I can't seem to find any way to make a link do two things at once. Now I just need to figure out the code to make that work. Thank you for the reply. :)
what style of changes do you want?

something like clicking on a menu link and then displaying the main content of the link as well as some submenu items??


Real Name No Gimmicks
Hi guys...

First of all, I'm kinda stoned and it's 06.15 am here (don't ask) so if this doesn't make sence just ignore me.

How about creating a link like
<a href="document_in_frame_2" target="frame2">link</a>
and then adding an "on-click" event to that link with Javascript...

<a href="document_in_frame_2" target="frame2" onclick="NewWindow(....">link</a>
would that work?

You could also check out dynamicdrive.com and check out their pop-up windows generator and alter that code to open the frame.

Maybe you could use Window.Location function too...


Geffy said:
what style of changes do you want?

something like clicking on a menu link and then displaying the main content of the link as well as some submenu items??
I wanted it to be kind of like chapters in a book. I click a link, and then the main page will come up in its frame, and the title frame would show what chapter you are in at all times. So for instance If I click chapter 2 in the links frame, the title frame would say chapter 2, and you could read chapter 2 in the main frame. When I click chapter 3, the title frame would say Chapter 3 and you could read chapter 3 in hte main frame. Kind of like that.

As to the java script post, the problem with java script is that I would still like it to be widely available for most browsers. Unfortunately I have no idea what my audiance is using. I get the feeling though that some may have java script turned off.


Real Name No Gimmicks
I dont think this is doable with only HTML... But hey, I dont know if my above post would work either.

Why do you get the feeling that some of your users turn off js? You could just put up a note on your site that your webpages require JavaScript to be dipslayed correctly.


OK I got it to work. I decided to go ahead and use javascript and like you said just let people know on the main page that they will need it enabled if they want it to work. (I think I can actually make this note appear only when the script doesn't run too which should also work.)

Basically I did this, I click the link on the left frame and the main page has an onload event to open the title url in topframe.

Thank you guys for the help! I appreciate it.


Members online

No members online now.

Latest posts

Latest profile posts

Hello, is there anybody in there? Just nod if you can hear me ...
What a long strange trip it's been. =)

Forum statistics

Latest member