Skip to content

Adjusting IFrame to fit content

March 8, 2007

The following was retrieved from my old SharePoint blog:

On a recent project, we wanted to display content from another server in an IFrame. However, we wanted the content to seem “seamless” and not have any vertical scrollbars appear. I managed to get some Javascript to get the job done in a simple scenario but fails in the more compliated scenario we were dealing with.

The problem was that for the script to work, both servers must be in the same domain. The typical way you would do this is to have both web pages set their document.domain property to the same the parent domain. However, as I described in another post, this breaks the SharePoint dropdown menus. Our workaround was to make the height configurable, not an entirely satisfactiory solution but still not a show-stopper.

I will check if this problem has been corrected in V3.

Here’s a similiar piece of work I found on another blog.
SharePoint Page Viewer: automatically adjust iFrame height


From → Uncategorized

Leave a Comment

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s

%d bloggers like this: