Link to home
Start Free TrialLog in
Avatar of lcoombes
lcoombes

asked on

Loading two frames in one link.

I am working on a page which is divided into two frames.  On the left is a menu frame and on the right is the content.  I have multiple sections to the site and had to break it up into sub-sections.  I have done this by creating multiple menu pages.  There is a main menu which links to the sub-menus.  The sub-menus link to the content pages.

Here is my problem.  When I want to load a content page from a different menu, I want to load the menu frame that goes with it as well.  This would mean that one link would actually link to two pages (one for the content page and one for the menu page).  Is there a way to do this?  If so, how?
Avatar of andriv
andriv

Not sure if this will work but give it a shot.
<IMG SRC="menu.html" target="left"><img src="content.html" target="right">link</a>/</a>
Correction I meant <A href= on both not img src.
Avatar of knightEknight
A href='javascript:;' onClick='top.menuframe.location="menu1.htm";top.mainframe.location="main.htm";return(false);'>Click Me</a>

... where your frames are named "menuframe" and "mainframe"
oops, left out the "<" above:

<A href= ...
Try it with the easy way:
First, create your TARGET page, which is created with 2 frames: MENU and CONTENT.

Then just link your "DIFFERENT MENU" page to your TARGET page, and here you go ! It works just fine, I'm sure !

Avatar of lcoombes

ASKER

avtonet, I had already thought of this method, but would be forced to make a lot of little target pages which would cause the administration of the site to get out of hand.  Thanks for the thought though!

andriv,  your idea was the first thing I tried.  Unfortunately, it does not work.

knightEknight, Your solution worked perfectly!  Please post it as an answer so I can give you the points!  Thanks!
You can either try what knightEknight has suggested or instead of trying to load 2 pages, you can just load a single page, containing 2 frames (menu and content) in the parent window. I feel this should be handled by some script.
ASKER CERTIFIED SOLUTION
Avatar of knightEknight
knightEknight
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Fixed the -1 problem on this question.
All points have been verified. Experts will now get the points you originally tried to award.
Moondancer
Moderator @ Experts Exchange