Reputation: 95
function iframeLoaded() {
var iFrameID = document.getElementById('iframe_login');
if (iFrameID) {
// here you can meke the height, I delete it first, then I make it again
iFrameID.height = "";
iFrameID.height = iFrameID.contentWindow.document.body.scrollHeight + "px";
}
}
This script is not working in Mozilla firefox but it works in chrome.
Upvotes: 1
Views: 61
Reputation: 2167
use jquery, http://api.jquery.com/height/
function iframeLoaded() {
var iFrameID = $('#iframe_login');
if (iFrameID) {
iFrameID.height(...)
}
}
Upvotes: 2