Window -> IFRAME -> DIV
I have a window, that has an iframe, that has a div. The div has the ability to scroll the content within but not having full control of the parent window, I have to decide how large the div needs to be from within the iframe.
To do this, I have the following code JavaScript (please pardon the mix of jQuery/straight JavaScript):
$(window.parent).resize(function () {
var frameHeight = parent.document.getElementById('IFRAME_banner').offsetHeight - 52;
$("div.ajax__tab_body").height(frameHeight);
});
This code works fine as long as you resize the window by dragging one of the corners. If you vertically resize by dragging the bottom of the window, it does not fire this event and the div does not properly resize.
I use the iframe as a reference since it seems to automagically resize itself because of something the parent window does. (This is all in MS CRM Dyanamics...so who knows what is happening behind the scenes)
Does anyone know why this would be? And what I would have to do to work around this?
Hackish is ok in this instance. The whole thing is a big hack.