PDA

View Full Version : Targeting muliple frames?


Cool-August
08-16-2004, 02:35 PM
Is this even possible?

I am new to everything that is involved in building web sites so I don't know if this is a stupid question or not.

I am making a site that has 3 frames:
-one across the top
-second down the left side
-third (main) box shape fills rest of page

There is a partial navbar on the top frame that targets the opening page to each section on the site. When that opening page opens in the main frame, I'd like the left side frame to open with links to other pages for that section (at the same time). This means that when a different section is picked from the main navbar (in the frame at the top) that a different set of links will also appear in the left side frame.
For this to work, won't I have to target both the main frame and the side frame at the same time from the URL-link on the navbar? I've tried a couple things but couldn't get it to work. Can anyone help with the kind of code I need to add?

(It's not up and running yet, so I don't have a link for you to see it.)

Thanks, August

petervazed
08-16-2004, 02:41 PM
Try one of these:


Change it to suit your needs.
<a href="javascript:parent.one.location='frame1.html';parent.two.location='frame2.html'">
Change </a>

one/two = the name of your frameset frames.
frame1.html/frame2.hml = the pages you want to change to.( your page names)
-----------
<A href="#" onClick="document.frames.een.location='http://x.com';
document.frames.twee.location='http://y.com';">
Vervang de vensters Klik Hier</a>
geldt ook voor iframes.
--------
<a href="#" onClick="javascript: window.frame1.location='http://site1.com';
window.frame2.location='http://site2.com'">click here</a>
--------
PARENT FRAME
<a href="#"
onClick="parent.frames[1].location='left2.html';parent.frames[2].location='content1.html'
;parent.frames[3].location='right2.html';">yep</a>

The first frame in your frameset is 0
the second 1 .....
----
In this example:
frameset with 4 frames.
The top.html in the frameset is #0
So left and right ( navigation) and content change.

:cool:

Cool-August
08-26-2004, 11:44 AM
Wanted to say thanks for the help. None of them were working for me (I probably wasn't putting the right info in) so I was VERY HAPPY when the last one worked! Thanks a bunch!
August:)