Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations bkrike on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Load two frames from one link

Status
Not open for further replies.

cthaxter

Programmer
Aug 2, 2001
71
US
This seems to be a very basic problem, but I haven't yet found the answer.

I'm using Internet Explorer 6.0, but obviously it would be nice for the script to be useful in as many browsers and versions as possible.

I have a frameset with a navigation header across the top, then a left navigation bar and the main page at the bottom left (covering most of the window).

I want to be able to click on a link on the top frame and have it load the main page AND the left navigation bar (i.e., two different frames). Do I have to create an additional frameset page with two frames for the left bar and the main area, with the first frameset being only the top navigation bar and a large bottom area for the second frameset (a solution without using script) or can I use script to load two pages, one immediately after the other?

-Christopher
 
Here's a script that will work everywhere:

<script>
function loadTwo(url1, url2) {
parent.frame1.location.href = url1;
parent.frame2.location.href = url2;
}
</script>

. . .
<a href=&quot;javascript:loadTwo('first.html', 'second.html')&quot;>load 2 pages at once</a>

frame1 and frame2 are the names of frames defined in frameset.

good luck
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top