I've made a test site which uses templates to make the site more simplistic and more organized.
I use the following code bellow to execute my template files
index.php ->
<?
switch ($_GET['iframe])
{
default : include "$error_path/error.php";
break;
case "1" : include "$page_path/iframe.php";
break;
}
?>
The code above basically shows the iframe when index.php?iframe=1
iframe code ->
<iframe src="templates.php"
bgcolor=#000000 frameborder=0 width=100%
height=100%></iframe>
this basically runs the templates lets say
<?
switch ($_GET['page])
{
default : include "error.php";
break;
case "news" : include "news.php";
break;
case "links" : include "links.php";
break;
}
?>
in theory when index.php?iframe=1&page=news
it should show the iframe THEN the news page. The problem is that only the default is being displayed ERROR.php. This is because the iframe is looking into a different file !!!
Templates are normally used within the same page say
index.php ->
<?
switch ($_GET['page])
{
default : include "error.php";
break;
case "news" : include "news.php";
break;
case "links" : include "links.php";
break;
}
?>
this would just show index.php?page=news SIMPLE
The reason im asking this is because i would like a scroll placed inside the main index.php page. this stops the site having a main scroll bar. This is what im trying to achieve but is there any other way of using iframe in my case or another similar method of inner scroll bars.
I did think of having a iframe in each template page ! such as news, links etc. This would contain their own iframe. This would result in having a extra page to direct the iframe to a new page. This proves to be un organized.
thank you, if you can understand my problem please help ELSE Just ask and il alaborate.