-
-
Notifications
You must be signed in to change notification settings - Fork 3.6k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Making it more robust for all browsers
- Loading branch information
Showing
2 changed files
with
15 additions
and
11 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,13 +1,17 @@ | ||
function iFrameHeight() | ||
{ | ||
var h = 0; | ||
if (!document.all) | ||
{ | ||
h = document.getElementById('blockrandom').contentWindow.document.body.scrollHeight; | ||
document.getElementById('blockrandom').style.height = parseInt(h) + 60 + 'px'; | ||
} else if (document.all) | ||
{ | ||
h = document.frames('blockrandom').document.body.scrollHeight; | ||
document.all.blockrandom.style.height = parseInt(h) + 20 + 'px'; | ||
} | ||
var height = 0; | ||
var iframe = document.getElementById('blockrandom'); | ||
var doc = 'contentDocument' in iframe ? iframe.contentDocument : iframe.contentWindow.document; | ||
|
||
if (!document.all) | ||
{ | ||
height = doc.body.scrollHeight; | ||
iframe.style.height = parseInt(height) + 60 + 'px'; | ||
} | ||
else if (document.all) | ||
{ | ||
height = doc.body.scrollHeight; | ||
document.all.blockrandom.style.height = parseInt(height) + 20 + 'px'; | ||
} | ||
} |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.