Reputation: 23
i have the following line to control the height of an iframe from within its content:
$("#frame",top.document).height($("#frame",top.document).contents().find("html").height());
it works perfect until someone uses IE.. how can i get it to work with IE?
thanks in advance, Ello
found a solution:
var iFrame = parent.document.getElementById('frame');
newHeight = parseInt(iFrame.contentWindow.document.body.offsetHeight)+20;
$("#frame",top.document).height(newHeight);
Upvotes: 1
Views: 2150
Reputation: 23
ok, tomas, her we go:
var iFrame = parent.document.getElementById('frame');
newHeight = parseInt(iFrame.contentWindow.document.body.offsetHeight)+20;
$("#frame",top.document).height(newHeight);
Upvotes: 1