Hey guys, I'm trying to make an iFrame auto-resize to the content inside it (photo gallery). Everything is on the same domain. I read a hundred+ blog and forum posts and my eyes hurt from reading all those scripts. I tried this one: http://www.lost-in-code.com/programming/jquery-auto-iframe-height/ and followed instructions to the letter and it still does not work. It doesn't really say where to put those scripts exactly so I assumed the parent page not the page of the iFrame (photo gallery) Anyone know any easier / better scripts. No CSS or anything on this site just plain HTML site made on FrontPage 2002. Thanks again.
How about this? There's an example there... www[dot]dynamicdrive[dot]com/dynamicindex17/iframessi2.htm I tried it but with no luck. Other scripts I saw resize it again when the content is shorter. That script on Dynamic Driver only resizes it once to the longest stretch of content.
That's javascript, not a plain HTML site. It should be easy if you know how to modify javascript to suit your specific need. For photo gallery, why don't you use lightbox instead.
I already decided on Plogger for the gallery since the client wants to be able to upload images from his end and not call me every other day. Basically I want to put Plogger in an iFrame and have the iFrame auto-resize to the content inside it. I'm having a very hard time figuring it out. Well what's the best way to do it? I know it can be done. I can PM you the link to the site I'm working on so you can take a look
Hey every one, I tried the Dynamic Drive script again and got it working... BUT only working in Internet Explorer. It is not working in Firefox 9. I haven't tried Internet Explorer 7 or 8. This script does work so I'm sure there are people out there who know the fix for this... Thanks again
auto resizing is like the most evil thing you can do. I use noscript on firefox and have iframes disabled. Figure out a way to recode your template to resize within the windowed area, do not mess with the browser itself...malware apps will hate your site forever and ever, and it will only get worse as time goes on
what about like some Google search showes height= "100%" width="100%" or nest some PHP on the Iframe height and width. <?php if($image_file == "1"){ $iframe = '<iframe height="300" width="250">'; } elseif($image_file == "2"){ $iframe = '<iframe height="200" width="150">'; } At top of page before HTML you can set up the correct Iframe through the PHP vars. Have thumbnails the users pick as buttons (perse) and these pass information on the image file selected to the "post" method and allow for the right <Iframe> set up to be called for each dynamically. then in the HTML page where the Iframe would exist use <?php echo $iframe; ?> instead of the Iframe (complete the code) The layout of your site would've been helpful, if you're using images as thumbnails first, or if web users are uploading them. Why are you using Iframes again anyway? are you yanking somebody elses content? I don't understand why you would use an Iframe to display an image on your own site.