i want give iframe 100% width , height according content not taking 100% width nor 100% height.
i have tried give using position absolute iframe width increased more container lies.
here code:
<iframe id="solar_panel" width="100%" height ="740" src="<?php echo $s; ?>"></iframe> <script> var intervallistener = self.setinterval(function () {resizeiframe()}, 1000); function resizeiframe() { var obj = document.getelementbyid('solar_panel'); var objh = obj.contentwindow.document.body.scrollheight; obj.style.height = obj.contentwindow.document.body.scrollheight + "px"; if (objh != 0) { window.clearinterval(intervallistener); } } jquery(window).resize(function(){ resizeiframe(); }); </script> please me out of here.
Comments
Post a Comment