Iframe again.

  Post new topicReply to topicPrintable Version
<< View previous topic View next topic >>
Share: Del.icio.us  Digg  Google  Spurl  Blink  Furl  Y! MyWeb  
#1   Iframe again.
phptest
CZ Super Newbie
phptest has been a member for over 20 year's 20 Year Member
Status: Offline
Joined: Aug 22, 2004
0.01 posts per day
Posts: 58
Points: 3,076
   
Hi,

I open webpages (also php) in the iframe. This works great but theres one issue..

The height of the frame is set in the index.php file. Since the phppages i need to load in the frame are different hights im wondering if it would be possible to make the iframe resize in height based on the page that is loaded in the frame.

Would that be possible ?



Back to top Reply with quote
#2   re: Iframe again.
Kelly_Hero
PayPal Donation
CZ Revered Member
 Codezwiz Site Donator
usa.gif southcarolina.gif
Occupation: Web Developer
Age: 59
Gender: Female
Website:
Status: Offline
Joined: Aug 20, 2003
0.49 posts per day
Posts: 3765
Points: 351,412
   
Try this:
[ Register or login to view links on this board. ]



Back to top Reply with quote
#3   re: Iframe again.
mjhufford
CZ Active Member
 Codezwiz Site Donator
mjhufford has been a member for over 20 year's 20 Year Member
usa.gif arkansas.gif
Occupation: IT Industry
Age: 47
Gender: Male
Fav. Sports Team: Da Bears.
Website:
Status: Offline
Joined: Jul 01, 2004
0.04 posts per day
Posts: 288
Points: 15,094
  MSN Messenger 
Interesting, thanks for the link. Looks like dyanmic sizing only works for pages on the same domain.




_________________
"The pursuit of easy things makes men weak."
-David O. McKay
Back to top Reply with quote
#4   re: Iframe again.
Kelly_Hero
PayPal Donation
CZ Revered Member
 Codezwiz Site Donator
usa.gif southcarolina.gif
Occupation: Web Developer
Age: 59
Gender: Female
Website:
Status: Offline
Joined: Aug 20, 2003
0.49 posts per day
Posts: 3765
Points: 351,412
   
Yea. I noticed that when I was reading through the description of the script. I re-read your post, but you didn't indicate whether the pages being pulled into iframe were from your own site, or from other sites, so I thought I'd post it anyway. Just in case it might be of use.



Back to top Reply with quote
#5   re: Iframe again.
phptest
CZ Super Newbie
phptest has been a member for over 20 year's 20 Year Member
Status: Offline
Joined: Aug 22, 2004
0.01 posts per day
Posts: 58
Points: 3,076
   
Good thing is that the loaded pages wil come from the same domain.. so it should work..

But im wondering how to implement this.. do i use the current iframe i have and put the code in there too ?

Or do i need to make a new page with the code you suggest and load the pages for that i frame.. ? How do i do that ?



Back to top Reply with quote
#6   re: Iframe again.
Kelly_Hero
PayPal Donation
CZ Revered Member
 Codezwiz Site Donator
usa.gif southcarolina.gif
Occupation: Web Developer
Age: 59
Gender: Female
Website:
Status: Offline
Joined: Aug 20, 2003
0.49 posts per day
Posts: 3765
Points: 351,412
   


To configure this script, first, set the variables inside the script of Step 1 per the comments. As you can see, you can specify more than one iframe on the page in which the script should dynamically resize.

Secondly, for the code of Step 2, be sure the ID (ie: "myframe") matches the ID entered into the script, so the script knows which IFRAMEs to adjust. You may also change the width attribute (ie: 100%) to a different value, as the script only changes the height of the iframe, but not the width.

Finally, in the script of Step 1, there is a variable that toggles whether browsers that don't support this script (non IE5+/NS6+) should still see the iframe(s) or not. Generally you should choose to hide the iframe in these non compatible browsers (Opera 7 included), as the iframe's height is hardwired in these cases, and part of the external page most likely will be clipped and unviewable to the viewer if the external page's height exceeds the iframe's default height.


Make the adjustments as specified above. The first part of the code goes into the the <head> section of your page, in Nuke, probably header.php. Replace the iframe tag you currently have with the second part of the script's code.



Back to top Reply with quote
#7   re: Iframe again.
phptest
CZ Super Newbie
phptest has been a member for over 20 year's 20 Year Member
Status: Offline
Joined: Aug 22, 2004
0.01 posts per day
Posts: 58
Points: 3,076
   
Oke im gonna try that.. could not get it to work or me



Back to top Reply with quote
Display posts from previous:      
Add To: Del.icio.us  Digg  Google  Spurl  Blink  Furl  Y! MyWeb  
<< View previous topic View next topic >>
Post new topicReply to topic

Jump to 
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You cannot download files in this forum