|
-
Jan 18th, 2005, 09:00 AM
#1
Thread Starter
Lively Member
PHP Screen Size / IFRAME Help
I have a quick question. I have a webpage that I normally do an INCLUDE to include another webpage. However I am unable to INCLUDE another PHP page.
So somone suggested to me that I use IFRAME to pull the page in. This works good however I am wondering what avenue to take on this. Is it possible to make the IFRAME the same size as the page that is in it. IE 100%? I tried making the height 100% but it doesnt like it. Any thoughts?
What about using PHP to get the screen height and then plug that into the height portion of the IFRAME?
How do I plug something into the IFRAME statement using PHP? Like this.
<IFRAME Height = <? GET_['Height'] ?> .... (i know the syntax is wrong but you get the idea.
Thanks
-
Jan 18th, 2005, 09:58 AM
#2
Frenzied Member
Re: PHP Screen Size / IFRAME Help
If I had a dime for each.... bah
*smack* BAD PHP PROGRAMMER!
PHP is unaware of the user's screen size. It doesn't know or care. You are looking for javascript functionality. Would it even do what you want? Probably not, but you could look into it.
But tell me, how were you planning to use PHP if you can't do a simple include? Do us all a favor and make a page with nothing but the following:
PHP Code:
<?php phpinfo(); ?>
If that displays correctly, there should be no reason you can't use an include.
Last edited by ober0330; Jan 18th, 2005 at 10:17 AM.
-
Jan 19th, 2005, 08:12 AM
#3
Re: PHP Screen Size / IFRAME Help
 Originally Posted by wookie224
I have a quick question. I have a webpage that I normally do an INCLUDE to include another webpage. However I am unable to INCLUDE another PHP page.
So somone suggested to me that I use IFRAME to pull the page in. This works good however I am wondering what avenue to take on this. Is it possible to make the IFRAME the same size as the page that is in it. IE 100%? I tried making the height 100% but it doesnt like it. Any thoughts?
What about using PHP to get the screen height and then plug that into the height portion of the IFRAME?
How do I plug something into the IFRAME statement using PHP? Like this.
<IFRAME Height = <? GET_['Height'] ?> .... (i know the syntax is wrong but you get the idea.
Thanks
You seem to be confused about client side an server side. Things like the screen resolution and IFRAMEs are client side. You need to use Javascript or CSS.
To set the height of the iframe you need to set it explicitly, 100% won't work:
<iframe stlye="height: 500px>
To include a file in PHP you don't use iframes. You use the include language construct.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|