Hello, I am trying to set the window height after the content height inside the window:
function setWinformDimensions() {
var scrOfX = 0, scrOfY = 0;
if(typeof(window.pageYOffset) == 'number') {
//Netscape compliant
scrOfY = window.pageYOffset;
scrOfX = window.pageXOffset;
}
else if (document.body && (document.body.scrollLeft || document.body.scrollTop)) {
//DOM compliant
scrOfY = document.body.scrollTop;
scrOfX = document.body.scrollLeft;
}
else if (document.documentElement && (document.documentElement.scrollLeft || document.documentElement.scrollTop)) {
//IE6 standards compliant mode
scrOfY = document.documentElement.scrollTop;
scrOfX = document.documentElement.scrollLeft;
}
scrollHeight = scrOfY;
scrollWidth = scrOfX;
formHeight = document.body.clientHeight + scrollHeight;
formWidth = document.body.clientWidth;
// scrollHeight gives me 0 as value in IE8+9, FF3 and Opera
parent.winformMain.window('winformMain_fsm_issueadded').setDimension(500, formHeight);
}
The function is then called on onLoad in my attached URL page. But since I cannot seem to get the vertical scroll height it is not possible to set the actual height.
Do you have any ideas?