How to make iFrame's height be the same as the page it will load?
Started by Matheus, May 05 2006 07:29 PM
13 replies to this topic
#1
Posted 05 May 2006 - 07:29 PM
Here is the problem:
- I don't want my iFrame with a scrollbar, I want it to resize it's height acording to the height of the page it wil load
exemple: I click on a hyperlink to a page with 900px height (target on the iFrame). But the iFrame is currenlty with 300px. How can I make it automaticaly resize to 900px when clicking the hyperlink?
thank you
- I don't want my iFrame with a scrollbar, I want it to resize it's height acording to the height of the page it wil load
exemple: I click on a hyperlink to a page with 900px height (target on the iFrame). But the iFrame is currenlty with 300px. How can I make it automaticaly resize to 900px when clicking the hyperlink?
thank you
#2
Posted 06 May 2006 - 03:20 AM
Oh my, it's a long time since I worked with iframes!
What you could do is something like this, but I'm not sure:
Hope it helps!
What you could do is something like this, but I'm not sure:
<iframe scrolling="no" height="100%"></iframe>
Hope it helps!
#3
Posted 06 May 2006 - 09:31 AM
That wont work, the iframe will stretch not as much as the frames page is but as high as the table column its in, if you know what i mean.
Your better of using a php include
<?php include("file.html"); ?>
Your better of using a php include
<?php include("file.html"); ?>
#4
Posted 06 May 2006 - 12:51 PM
Includes are way better, yeah - IF your host supports php. I was on a non-php-supportive host for over a year myself, and found iframes useful for most of my tasks.
But if my example won't do, I have no clue.
But if my example won't do, I have no clue.
#5
Posted 06 May 2006 - 02:38 PM
Avalanche, on May 6 2006, 02:31 PM, said:
That wont work, the iframe will stretch not as much as the frames page is but as high as the table column its in, if you know what i mean.
Your better of using a php include
<?php include("file.html"); ?>
Your better of using a php include
<?php include("file.html"); ?>
i put that code instead of
<iframe src ="/anypage.htm"> </iframe>?
hwo do I use it correclty? (any tutos?)
#7
Posted 06 May 2006 - 05:22 PM
ok, i followed the tuto, but it doesn't load anything. isn't hosted yet, but I can't see nothing when I open it with firefox
#9
Posted 06 May 2006 - 07:21 PM
I tryed the iframe resize stuff with the javascript, it worked but not so good, there were some bugs (javascript isn't too good)
I wan't to know more about this include funcion, searched pixel2life for include at PHP section but I didn't get a nice explanation
I wan't to know more about this include funcion, searched pixel2life for include at PHP section but I didn't get a nice explanation
#10
Posted 06 May 2006 - 08:18 PM
php doesn't work on regular computers, you need to upload it first
(unless you installed php onto your pc (i dont think you did..))
(unless you installed php onto your pc (i dont think you did..))
#11
Posted 06 May 2006 - 10:58 PM
and how do I make links target to the include?
#12
Posted 07 May 2006 - 12:55 AM
you cant.
you need to use a different include for each page, then have links target the page.
you need to use a different include for each page, then have links target the page.
#14
Posted 08 May 2006 - 03:20 PM
http://www.pixel2life.com/forums/index.php...20995&hl=iframe
This question has been asked before, please use the forum search.
This question has been asked before, please use the forum search.
Edited by rc69, 08 May 2006 - 03:21 PM.
1 user(s) are reading this topic
0 members, 1 guests, 0 anonymous users
