0

I used iframe on my Page. I want to hiding iframe's scroll. I added scrolling=no in my code. But I can't see the entire of page, in this case.

How can I hiding scroll and I see entire of page?

0

You can auto adjust the iframe to fit to content.

<script language="JavaScript">
<!--
function autoResize(id){
    var newheight;
    var newwidth;

    if(document.getElementById){
        newheight=document.getElementById(id).contentWindow.document .body.scrollHeight;
        newwidth=document.getElementById(id).contentWindow.document .body.scrollWidth;
    }

    document.getElementById(id).height= (newheight) + "px";
    document.getElementById(id).width= (newwidth) + "px";
}
//-->
</script>

<IFRAME SRC="usagelogs/default.aspx" width="100%" height="200px" id="iframe1" marginheight="0" frameborder="0" onLoad="autoResize('iframe1');"></iframe>

Source - https://stackoverflow.com/questions/819416/adjust-width-height-of-iframe-to-fit-with-content-in-it

| improve this answer | |
  • this answer doesn't solve my problem. When I added your code in my page, scroll is shown. I add "scrolling=no" but I can't see entire of the page, again. – zengel Jan 30 '15 at 14:54

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.