jquery - Get iframe height -
jquery - Get iframe height -
in page content have external iframe, problem dont want scroll have on iframe, dont know how long iframe be??
<iframe id="newsletter" src="http://www.vimontline.com/" frameborder="0" width="100%" marginheight="0" marginwidth="0" scrolling="no"> </iframe>
no problem width, problem have height, want remove scrool iframe, dont create code height="100px", thought jquery how iframe within height, have add together id height?
you cannot access info parent page. if command url loaded iframe you're able tell it's parent resize 1 time dom loaded.
code in iframe:
parent.resizeframe(document.body.scrollheight)
code parent page:
function resizeframe(height) { document.getelementbyid('blogiframe').style.height = parseint(height, 10) + "px"; }
you may need add together little height prevent scrollbar inconsistencies across browsers.
jquery iframe
Comments
Post a Comment