PDA

View Full Version : Include vs FRAMES


lighting
02-23-2005, 12:36 PM
Hi,

I'd like to ask you how to implement in e.g. PHP or other technology the same thing as FRAMES - I mean I need to reload only the main part of my webpage while other stays static. I've much graphic which slows down the whole webpage while reloading it (now I use PHP's include). Using FRAMES I was able to reload only one FRAME - how to implement it without FRAMES ?

Thanks,

lighting

tofu-tramp
03-01-2005, 03:14 PM
i don't think it's possible, using simple php anyways. you could prolly get really complicated and make it happen, but i sure don't know how.

Tarmithius
03-01-2005, 05:51 PM
well a simple php page can be all html with the php extension. However you can use a php include to include certain aspects of the page that remain static, e.g. menus header.

Tarmithius
03-01-2005, 05:57 PM
Here is a quick example. The header.php and footer.php can be pure html but make sure you would name them with the php extension.

FirkinGuy
03-08-2005, 11:22 AM
I have a web site which was intially designed with two frames across and varying numbers of frames down. Frames would not allow me to set the contents of a frame from a lower level. So I came up with the scheme shown here:

$left_page = $_SESSION['rr_left_page'] ;
$right_page = $_SESSION['rr_right_page'] ;

<td style="width: 50%" valign=top>
<?php
if ($left_page == 'left_1.inc') {
include ('left_1.inc') ;
}
if ($left_page == 'left_2.inc') {
include ('left_2.inc') ;
}
if ($left_page == 'left_3.inc') {
include ('left_3.inc') ;
}
?>
</td>
<td style="width: 50%" valign=top>
<?php
if ($right_page == 'right_1.inc') {
include ('right_1.inc') ;
}
if ($right_page == 'right_2.inc') {
include ('right_2.inc') ;
}
if ($right_page == 'right_3.inc') {
include ('right_3.inc') ;
}
?>
</td>

The session variables, which determine what is shown in any 'pane' are set by the underlying logic. To see this in action, go to:
"railroads.almontecentral.ca"