Calling a function when a scrollbar appears in an IFrame
- by chris
I got an IFrame, in the onload event i set the height of the frame:
function resizeFrame() { $("#iframeID").height($("#iframeID").contents().find("body").outerHeight(true)); }
Problem is:
When the content of the frame is increasing without a postback (javascript or Async Postback with Ajax), a scrollbar appears.
I found a solution for Firefox:
document.getElementById("iframeID").contentWindow.addEventListener("overflow", resizeFrame, false);
But i can't find a solution for IE 7+8
Anyone got an idea?