We help IT Professionals succeed at work.

Question about switching framesets....

beorn asked
Last Modified: 2010-04-09
Is there a way I can specify a button to open a specific page on a different frameset than the one I'm using?

Let's say, I'm on frameset A with 3 panes, and I click on a button on the left pane.  I want that button to open a specific page (other than the default page), on frameset B which only has 2 panes.

Can I do this with the java buttons?

Thank you.
Watch Question

Yes...in your <a href="yourpage.htm"> make it look like this:
<a href="differentpane.htm" target="panename">link</a>

That will load the page in the frame of your choice...just replace panename with the name of the frame...this should do the trick.

Here is an additional link just in case that is unclear....



That just opens a page in a given frame.  What I need to do is open a different frameset while I'm on one.

I need it to load a frameset, a specific page(other than the default one that loads with the frameset), and substitute the frameset I'm using.


OK...here is what you can do...this is crude but it will work...

add this into the newframeset.htm page...

<script language = "Javascript">

if (top.location != location) top.location.href = location.href;


This will break you out of your old frameset and load the totally new one...

Do you mean, open a page in a frameset which is in a different window ?


Actually it's quite complicated. I have frameset "A" with a "top", left and main frame.

Everything on the top frame willl open in the main frame.  The links on the "left" frame must open specific pages on a frameset "B" (which only has 2 frames, "left" and "main").

What I need to know is how I get rid of the "top" frame when I click on the links at the left?

I don't want the links at the left open in the nested "main" window of the frameset "A".

I tried the javascript above from Sir Caleb, on the frames page B, but nothing happens.

Thanks for your patience. :-)
Unlock this solution and get a sample of our free trial.
(No credit card required)

Hrmm...I use that script a lot because I know that if somebody else links their site to mine and the link is in a frameset, my frameset will show up within their frameset...that script essentially "breaks" you out of the frames that are already loaded when you enter a page...it might only work w/ certain browsers...
Your right...that is a complicated problem....I've now got a clear picture in my mind what it is your trying to do...tricky...
Sybe's answer will probably work...I've never really tried that before...frames are just plain tricky...
Unlock the solution to this question.
Thanks for using Experts Exchange.

Please provide your email to receive a sample view!

*This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.


Please enter a first name

Please enter a last name

8+ characters (letters, numbers, and a symbol)

By clicking, you agree to the Terms of Use and Privacy Policy.