Click to See Complete Forum and Search --> : building a frameset for menu and forum body


crmpicco
02-24-2008, 04:46 PM
I am looking to change the following page to use two frames rather than an iframe as I am using just now.

http://www.ayrshireminis.com/mini/en/forum2.php

The following code doesn't display it really, how would I do this?


<frameset rows="25%,75%" frameborder="0">
<frame src="http://www.ayrshireminis.com/mini/inc/header2.php" noresize scrolling="no">
<frame src="http://www.ayrshireminis.com/mini/phpBB2/index.php" noresize scrolling="no">
</frameset>

I'm just looking for a frame at the top for the header menus and then a body frame for the forum.

Picco

Frank62
02-24-2008, 05:08 PM
Picco,

You can't have a frameset within a page. It's one of both, iframes excepted. This is the code you should be using:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<title>Page title</title>
<frameset rows="25%,75%" frameborder="0">
<frame src="http://www.ayrshireminis.com/mini/inc/header2.php" noresize scrolling="no">
<frame src="http://www.ayrshireminis.com/mini/phpBB2/index.php" noresize scrolling="no">
</frameset>
</head>
</html>

In other words: for a framed page you need at least three files: the file that creates the frames and calls in the pages that go in the frames, and the two pages. In this case header2.php and index.php. Which latter you should rename, to avoid confusion (the index page is always the first page of a website).

crmpicco
02-25-2008, 03:01 PM
that's great Frank, thanks! I've added in this frameset now, so I have got this working. But the issue seems to be now that when I click on a link in the top frame it changes the content of the top frame, see:

http://www.ayrshireminis.com/mini/en/forum2.php

As I am using the same header script (header2.php) for regular pages as well as the framed page i'm not sure how to change the content in the bottom frame, see:

http://www.ayrshireminis.com/mini/en/contact2.php

PS: Looks like i'm going to need to get a new style for my PHPBB2 board as the one i'm using doesn't look very "2.0" with the frame appearing so obvious now......

Thanks,
Picco

Frank62
02-25-2008, 03:31 PM
Picco,

To change content of another frame than where the link is in, you have to use a target. As in:
<a href=forum2.php" target="navFrame">Forum</a>.

You will wonder how the browser knows which frame is the navFrame. That goes as follows:

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> <html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<title>Page title</title>
<frameset rows="25%,75%" frameborder="0">
<frame name="navFrame" src="header2.php" noresize scrolling="no">
<frame name="contentFrame" src="phpBB2/index.php" noresize scrolling="yes">
</frameset>
</head>
</html>

Regarding the style: I like the BB style. Actually, to be honest, I like it more than your new style.......

Frank62
02-25-2008, 04:50 PM
Picco,

The example should read: <a href="forum2.php" target="contentFrame">Forum</a>.

crmpicco
02-27-2008, 04:19 PM
thanks Frank, however the problem is if you go to http://www.ayrshireminis.com/mini/en/forum2.php you will see that this does not work when I click any of the other tabs and when i do select the forum one i writes the header again :-(

Picco

Frank62
03-01-2008, 08:56 AM
Picco,

It works alright, but your tab link to the forum is incorrect.

On the index page you are calling in www.ayrshireminis.com/mini/inc/header2.php (navmenupage in navframe) and www.ayrshireminis.com/mini/phpBB2/index.php (forumpage in contentframe).

With the forum tab link, you are calling in http://www.ayrshireminis.com/mini/en/forum2.php. But that page is again the frameset, with calls in two above-mentioned pages again. In the contentframe, and that is exactly what you're seeing.

crmpicco
03-04-2008, 12:50 PM
cheers again frank, but logically I don't think this is going to make much sense or work - as I only need the frameset when i'm on the forum page (forum2.php as it is just now!)

I think I might just href to the phpBB2/index.php forum page and lose the header altogether for the forum - what do you think?

Picco

Frank62
03-05-2008, 08:58 AM
That would be a good idea, because I think they don't go well together. Just put this link in then in the Forum tab: <a href="http://www.ayrshireminis.com/mini/phpBB2/index.php" target="_blank">Forum</a>.