damianb123
asked on
require Iframe but using PHP headers
Hi,
I have a PHP website configured which uses the header.inc.php and footer.inc.php as the template. I have a box in the middle of the page which I require as an Iframe, however the Iframe page src would need to be hard coded into the header.inc, which cannot happen due to the various pages.
What I want to achieve is this box in the middle, rather than extending the page and making everything out of sync, I want a scrollbar, so the page size is always the same.
Can anyone give me any advice?
Thanks
Damian
I have a PHP website configured which uses the header.inc.php and footer.inc.php as the template. I have a box in the middle of the page which I require as an Iframe, however the Iframe page src would need to be hard coded into the header.inc, which cannot happen due to the various pages.
What I want to achieve is this box in the middle, rather than extending the page and making everything out of sync, I want a scrollbar, so the page size is always the same.
Can anyone give me any advice?
Thanks
Damian
ASKER
I have a table with two columns..... the right hand column has an image within it, which is fine. The left hand column has another embedded table, which currently has text within it, however if that text is more than then length of the column it drags the page down. I want this to be static and use a scrollbar.....
I hope that makes it clearer.
Thanks
I hope that makes it clearer.
Thanks
<iframe src ="myInnerPage.html" width="100" height="300">
<p>Your browser does not support iframes.</p>
</iframe>
<p>Your browser does not support iframes.</p>
</iframe>
ASKER
The trouble with that ronan1979 is that the PHP is using the header.inc.php for its template, as each page has different content, but uses the same header file - your suggestion will make all pages the same won't it?
Damian
Damian
<!-- header -->
<a href="1.html" target="content">page 1</a>
<a href="2.html" target="content">page 2</a>
<!-- content -->
<iframe id="content" name="content" src="default.html" width="100" height="300">
<p>Your browser does not support iframes.</p>
</iframe>
<a href="1.html" target="content">page 1</a>
<a href="2.html" target="content">page 2</a>
<!-- content -->
<iframe id="content" name="content" src="default.html" width="100" height="300">
<p>Your browser does not support iframes.</p>
</iframe>
ASKER
Thanks ronan1979, how would the loading page know which a href to use? Will that load all the pages?
the links in header will load in the iframe called 'content' because
- they have the target attribute set to 'content'
- the iframe is named 'content'
so if you click on [page 1] it will load '1.html' in the iframe.
so if you click on [page 2] it will load '2.html' in the iframe.
your global page does not change, only the iframe changes.
- they have the target attribute set to 'content'
- the iframe is named 'content'
so if you click on [page 1] it will load '1.html' in the iframe.
so if you click on [page 2] it will load '2.html' in the iframe.
your global page does not change, only the iframe changes.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
the idea of @Swafnil is a good option.
if the server is set to compress/zip the text pages i supposed its not going to be a problem.
if the server is set to compress/zip the text pages i supposed its not going to be a problem.
ASKER
Perfect, very neat code and easy to follow, your suggestion of using s DIV is wonderful, just what I required.
Thanks v much
Thanks v much
This is what I'm guessing how the page should look like (hope the "ascii art" doesn't get distorted too much).
Open in new window