one link multiple targets

J

Jos

Hi,

I've been looking for the best way to make a page that consists of
three frames, one page-wide frame for a title on top with two colums
beneath. There are situations where I want to change all three frames
through one link. So far I have found two ways to do this, they work,
but I'm not completely satisfied.

The first one is the simplest: just make a frameset page for every
possible combination of pages I want to display simultaneously, but
this is too much of a hassle and I suppose it can be done more
elegantly.

The second involves javascript (from http://javascriptsource.com):
<head>
<SCRIPT LANGUAGE="JavaScript">

<!-- Begin
function loadFrames(frame1,page1,frame2,page2,frame3,page3) {
eval("parent."+frame1+".location='"+page1+"'");
eval("parent."+frame2+".location='"+page2+"'");
eval("parent."+frame3+".location='"+page3+"'");
}
// End -->

</script>
</head>

<body>
<a href="javascript:loadFrames('titlewindow', 'Title.html',
'mainwindow', 'Main.html', 'leftwindow', 'Left.html')">link</a>
</body>
It works but the problem here is that when you hit the "back"-button
in your browser only one of the frames goes back to the previous page,
which results in (for instance) the wrong title for a page. If you hit
the "back"-button again, again only one frame goes back.

My question is if somebody knows how to solve the problem with the
javascript-option or knows something completely different that works
well. It might help that the links are never in the title window,
always in the bottom two.

Thanks,
Jos
 
P

PeterMcC

Jos said:
Hi,

I've been looking for the best way to make a page that consists of
three frames, one page-wide frame for a title on top with two colums
beneath. There are situations where I want to change all three frames
through one link. So far I have found two ways to do this, they work,
but I'm not completely satisfied.

This may appear to be facetious but, genuinely, why are you making all that
trouble for yourself? Build the pages without frames and the problem's
solved - there surely aren't any benefits to you feel you're getting from
frames that are worth that amount of trouble.

Perhaps you could outline what you're wanting to achieve as regards the
layout - I can't help feeling that you're solving the wrong problem.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,731
Messages
2,569,432
Members
44,832
Latest member
GlennSmall

Latest Threads

Top