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

Shade2074

OSNN Addict
Joined
23 Mar 2004
Messages
83
Hello,

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.
 
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??
 
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
Code:
<a href="document_in_frame_2" target="frame2">link</a>
and then adding an "on-click" event to that link with Javascript...

Code:
<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...




Grtz,


Lukas
 
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.
 
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.

Grtz,

Lukas
 
you could do a little hack. frame 1 loads the first frame, frame 2 loads a html doc that loads 2 more frames.
 
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 profile posts

Also Hi EP and people. I found this place again while looking through a oooollllllldddd backup. I have filled over 10TB and was looking at my collection of antiques. Any bids on the 500Mhz Win 95 fix?
Any of the SP crew still out there?
Xie wrote on Electronic Punk's profile.
Impressed you have kept this alive this long EP! So many sites have come and gone. :(

Just did some crude math and I apparently joined almost 18yrs ago, how is that possible???
hello peeps... is been some time since i last came here.
Electronic Punk wrote on Sazar's profile.
Rest in peace my friend, been trying to find you and finally did in the worst way imaginable.

Forum statistics

Threads
62,015
Messages
673,494
Members
5,621
Latest member
naeemsafi
Back