In nutshell, how to display a Page Viewer Web Part with 100% height of the available screen estate.
http://blogs.msdn.com/malag/archive/2008/09/15/story-of-a-mischievous-page-viewer-web-part.aspx
var a = MSO_ContentTable.getElementsByTagName("table");
MSO_ContentTable.setAttribute("height","100%");
for(i=0;i<a.length;i++)
{
a[i].setAttribute("height","100%");
}
var z = document.getElementsByTagName("div");
for(i=0;i<z.length;i++)
{
if(z[i].id.indexOf("WebPartWPQ",0) >=0 )
{
if(z[i].hasChildNodes())
{
if(z[i].firstChild.nodeName.toUpperCase() == "IFRAME")
{
z[i].firstChild.setAttribute("height","100%");
}
}
}
}</script>
No comments:
Post a Comment