Do autoSizeOther/autoSizeImages resize the page?

Page: 1

Author Post
vamsee
Guest
I'm just wondering if autoSizeOther and autoSizeImages do what I'm guessing they do. For example, I'm trying to load a site (specifically, www.techcrunch.com), into FB through the iframe mode. I've set both the above options to true, and set height and width to 500 and 800 respectively.

I was thinking this will resize the entire page into fitting the window. But I still see a horizontal scrollbar at the bottom, and I can see only 80% of the page unless I use the horizontal scrollbar. Am I missing something? Thx for any help.
Administrator
Registered: Aug 2008
Posts: 3382
autoSizeImages and autoSizeOther will only ever proportionally decease the dimensions of a box to make it fit fully in the available browser window space. That is, if the requested or native floatbox size is greater than the screen size, the floatbox will be shrunk to fit, but these options can never cause the floatbox dimensions to increase.

To get an iframe floatbox to be the full size of the contained document, I've always found it best to leave scrolling:auto and experiment with the dimensions (width:xxx height:yyy) until it fits without showing scrollbars. You need to try different browsers because they each layout pages slightly differently.

You can use fb's resize function to autofit ifame content if you like. In the iframe content's source, set an onload function in the body tag (or setup a window.onload function) as follows:
onload="parent.fb.resize(document.body.offsetWidth, document.body.offsetHeight);"
I think this works, but am not in a position to check it myself, so please test and adjust as necessary.
vamsee
Guest
Ah, okie, thanks. I've already figured out a way to set the width/height automatically. I initially thought those options are for resizing the iframe's content itself, though I wasn't very sure of it. Thanks for clearing it up.

Page: 1