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

by Waqas 7/29/2008 4:57:00 PM

You can use following javascript code to dynamically adjust width and height of the page viewer webpart.
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.

Currently rated 5.0 by 1 people

  • Currently 5/5 Stars.
  • 1
  • 2
  • 3
  • 4
  • 5

Tags:

Tips n Tricks

Related posts

Add comment


(Will show your Gravatar icon)  

  Country flag

biuquote
  • Comment
  • Preview
Loading




Tags

© Copyright Beyond Web Logs.


Recent comments

Disclaimer

The opinions expressed herein are my own personal opinions and do not represent my employer's view in anyway.

© Copyright 2008

Sign in