I am in need of doing the following:
Simple and clean. jQuery is required. Source: https://stackoverflow.com/a/3940802
Modified a bit
function iframeHeight() {
var newHeight = $(window).height();
var newWidth = $(window).width();
var buffer = 100; // space required for any other elements on the page
var newIframeHeight = newHeight - buffer;
$('iframe.fop').css('height',newIframeHeight).css('width',newWidth); //this will aply to all iframes on the page, so you may want to make your jquery selector more specific.
}
// When DOM ready
$(function() {
window.onresize = iframeHeight;
iframeHeight();
});