Posts

Showing posts from March, 2009

How to modify the width and height of a Sharepoint Page Viewer web part dynamically

You can use following JavaScript code to dynamically adjust width and height of the page viewer web part. Just put it in each asp.net page that you want to display in a page viewer, and the problem will be solved: JavaScript code: function resizeMe(that) { window.resizeTo(document.body.scrollWidth, document.body.scrollHeight); } window.attachEvent("onload", function() { window.setTimeout("resizeMe()", 100); }); Alternatively, window.resizeTo(window.screen.availWidth, window.screen.availHeight); can also be used.