pghdeveloper
Programmer
I have a master page that has an IFRAME, which we use for resizing. Locally, when we are using our web application within our network, the resizing works perfectly for both Firefox and IE. However, when I access the web application from outside the network the resizing doesn't always work. Most of the time, the offsetheight for the div(container is the name) is not correct, thus I don't see all the results that I need to see in the IFRAME Here is the resizing code below.
function resizeTheFrame() {
var iframe = document.getElementById('innerFrame');
var containerHeight = document.getElementById('container').offsetHeight;
var DefaultPageHeight = 400;
if (containerHeight > DefaultPageHeight) {
var heightdiff = 100;
}
else {
var heightdiff = DefaultPageHeight - containerHeight;
}
containerHeight = containerHeight + heightdiff;
var counter = parent.top.window.location.href.lastIndexOf("/");
var urlStr = parent.top.window.location.href.substring(0, counter + 1);
iframe.src = urlStr + "resizer.htm?height=" + containerHeight;
}
function resizeTheFrame() {
var iframe = document.getElementById('innerFrame');
var containerHeight = document.getElementById('container').offsetHeight;
var DefaultPageHeight = 400;
if (containerHeight > DefaultPageHeight) {
var heightdiff = 100;
}
else {
var heightdiff = DefaultPageHeight - containerHeight;
}
containerHeight = containerHeight + heightdiff;
var counter = parent.top.window.location.href.lastIndexOf("/");
var urlStr = parent.top.window.location.href.substring(0, counter + 1);
iframe.src = urlStr + "resizer.htm?height=" + containerHeight;
}