How to calculate the size of an iFrame Back
var calcPageHeight = function(doc) {
var cHeight = Math.max(doc.body.clientHeight, doc.documentElement.clientHeight);
var sHeight = Math.max(doc.body.scrollHeight, doc.documentElement.scrollHeight);
return Math.max(cHeight, sHeight);
};
var calcPageWidth = function(doc, win) {
if (!!win.ActiveXObject && doc.documentMode <= 8 && doc.compatMode === 'CSS1Compat') {
var cWidth = Math.min(doc.body.clientWidth, doc.documentElement.clientWidth);
return cWidth;
} else {
return Math.max(doc.body.clientWidth, doc.documentElement.clientWidth);
}
};