MOSS Forum

Ask Question   UnAnswered
Home » Forum » MOSS       RSS Feeds

Increase the size of a zone on a web part page

  Asked By: Alec    Date: Nov 21    Category: MOSS    Views: 3612

I have a web part page and i am using the page viewer web part to view
some web pages in Sharepoint 2007.

What i would like is that the web part would automatically resize to
the height of the web page it is displaying. The information in the web
page varies. From the options i can either put a fixed size on the web
part or it will be restricted to the size of the zone.

Anybody got any ideas?



2 Answers Found

Answer #1    Answered By: Octavio Dotson     Answered On: Nov 21

Unfortunately, afaik there is no way to make a page  viewer resize
automatically out of the box.

You can do it with Javascript in a content editor web  part on the
page. Here is some script I use on one of my pages. It looks for all
iframes on the page and resizes them. It may need tweaking for your

<SCRIPT LANGUAGE=javascript>
function reSize(FrameID)
var oBody = document.frames
var oFrame = document.all(FrameID);

//window.status = "Resizing: " + FrameID;
oFrame.style.height = oBody.scrollHeight +
(oBody.offsetHeight - oBody.clientHeight);
//oFrame.style.width = oBody.scrollWidth +
(oBody.offsetWidth - oBody.clientWidth);
//An error is raised if the IFrame domain != its container's
//window.status = 'Error: ' + e.number + '; ' +
function reSizeAll() {
var anIframeID;
var coll = document.all.tags("IFRAME");
if (coll!=null)
for (i=0; i<coll.length; i++)
anIframeID = coll[i].id;


Answer #2    Answered By: Judy Pittman     Answered On: Nov 21

I have just started to try your javascript example and i don't think it will
work for me. The page  i am displaying the the webparts is frm a different
server - i am going to get an error. Is this anyway around this?

Didn't find what you were looking for? Find more on Increase the size of a zone on a web part page Or get search suggestion and latest updates.