what determines the iframe width and height floatbox opens?

Page: 1

Author Post
Member
Registered: May 2012
Posts: 13
Howdy,

I'm running into a bit of snag with getting the floatbox to open to the size of the html content being displayed within the iframe floatbox spawns.

The iframe content is running on our site (same domain). I've explicitly set the width to 600px and height to 600px for the body tag of the content the floatbox is opening within the iframe (/campaign/content.aspx) and I'm passing the following options:

showClose:false showOuterClose:true shadowType:'halo' showNewWindow:false centerOnResize:true resizeDuration:3 overlayFadeDuration:2 overlayOpacity:65 outsideClickCloses:false


var fbo = showClose:false showOuterClose:true shadowType:'halo' showNewWindow:false centerOnResize:true resizeDuration:3 overlayFadeDuration:2 overlayOpacity:65 outsideClickCloses:false
fb.start("/campaign/content.aspx", fbo);


I assumed that since I'm not specifying the width and height of the floatbox within the options that floatbox would sniff the width and height of the body tag being opened within the iframe and adjust its size accordingly but that's not the case, the floatbox is opening up to fill almost the entire parent view port.

Any suggestions as to what I'm doing wrong?

best regards,

rise4peace
Administrator
Registered: Aug 2008
Posts: 3063
If the line setting the fbo var is the actual line in production, then its throwing a syntax error for you. I assume you mean to create a string variable there, but there are no quotes around the string.

But that's not your sizing problem. I'm not sure what is, but setting css width and height on the body does not necessarily restrict the size of the document that is rendered. The browser will take up whatever space it needs to render the elements as instructed and if they need to overflow the body limits then they will.

I recommend you fix the fbo assignment, remove the body css width and height, add width:600 and srolling:no to the fbo options, and let Floatbox measure the height of the resulting content.

If that does not give the results you want, please let me see the page and we can dig deeper.
Member
Registered: May 2012
Posts: 13
I forgot to include the quotes around the values for the fbo var when i pasted it here for my question. Sorry about that.

At any rate, you solved my problem. Yay! The trick was setting scrolling:no which coupled with the default value of measureHTML being set to auto did the trick and it now looks fantastic.

thanks again for a wonderful product and absolutely spot on technical support. you rock! keep up the great work!

Page: 1