Here are some javascript functions that resizes the height and width of the DIV and IFRAME accordingly... The size specs will be based on the browser window. The following function below are tested on IE only... you may need to adjust the code a little bit to work well on non-IE browsers.
Have FUNC!
function init()
{
resizeDIV();
resizeIFrame();
}
function resizeDIV() {
var lyr = document.getElementById("ssrslayer");
lyr.style.height = window.document.body.offsetHeight + "px";
lyr.style.width = window.document.body.offsetWidth + "px";
}
function resizeIFrame() {
var lyr = document.getElementById("ssrslayer");
var rpt = document.getElementById("ssrsiframe");
var width = lyr.style.width.toString().replace("px","");
var height = lyr.style.height.toString().replace("px", "");
var topMargin = 30;
var leftMargin = 50;
var frameWidth = width - (leftMargin*2);
var frameHeight = height - (topMargin*2);
rpt.style.top = topMargin + "px";
rpt.style.left = leftMargin + "px";
rpt.style.height = frameHeight + "px";
rpt.style.width = frameWidth + "px";
}
Wednesday, December 1, 2010
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment