Click to See Complete Forum and Search --> : Frames Help


SABmore
08-13-2003, 12:21 PM
I've stayed away from frames for a while, but with a charity website I am doing, I would like to use them.

The basic layout of my webpage(s) will be as follows:

-Header Frame (nothing changes here, just holds a logo)

-Left-Hand Navigational Frame (all of the links listed are graphics, and as links are clicked, the graphics change to designate the selected link)

-Main Content Area (holds content relevant to the selected link)

Please look at the follow rough example to better follow my question:

http://www12.brinkster.com/sarnwine/bfest/overallframe.htm

My problem is that when I click on say "History", I need the "home" graphic to be changed to non-ribbon and the "history" graphic to be changed to having a ribbon. I also need the main content area to change to the associated history information. So in essence I need 2 frames to change at the same time.

Can someone point me in the right direction?

Thanks a lot in advance!!

soccer362001
08-13-2003, 02:17 PM
<a href="/home.html" target="nameofframe"><img src="contact_non.jpg" width="150" height="22" border="0"></a>

SABmore
08-13-2003, 03:18 PM
thanks for the help, but I'm still a bit confused.

If in my frameset I define 3 frames (header, navigation, and content). But then I want both the navigation and content frames to change when a navigational item is selected.

I can't just say <a href="" target =""> because this can only reference frames (pages) I've defined in my frameset, correct? Because using that means I call the file name of the page I want, and its frame name? Wouldn't I have to list all of the pages that I want to "target"?

Charles
08-13-2003, 04:05 PM
Welcome to the dark side of frames. A few observations...

1) You could do this easily with JavaScript but 13% of users do not use JavaScript. Furthermore, some of those good people cannot use JavaScript because of some disability. A JavaScript dependent web site is uncharitable.

2) There is a simple, JavaScript free method of changing two frames at once; switch out the whole frameset. You'll need a separate frameset for each state of you site.

3) Not all browsers support frames or support them the way that you expect. You need to ensure that each page can stand on its own. Having the logo in a separate frame is likely to be a bad idea.

soccer362001
08-13-2003, 04:58 PM
Try this.

<script language="JavaScript">
<!-- Begin
function loadFrames(page1, page2) {
framecode = "<frameset rows='50%,50%'>"
+ "<frame src='" + page1 + "'>"
+ "<frame src='" + page2 + "'>"
+ "</frameset>";

page = window.open("");
page.document.open();
page.document.write(framecode);
page.document.close();
}
// End -->
</script>

<a href="javascript:loadFrames('','')"></a>