Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Page 4 of 4 FirstFirst ... 234
Results 46 to 50 of 50
  1. #46
    New Coder
    Join Date
    Aug 2011
    Posts
    50
    Thanks
    0
    Thanked 2 Times in 2 Posts

    Resize iframe

    Have you tried the following Function?


    Code:
     function resizeIframe(obj) {
            obj.style.height = obj.contentWindow.document.body.scrollHeight + 'px';
            obj.style.width = obj.contentWindow.document.body.scrollWidth + 'px';
        }
    Don't forget to mark solution providing post as "Answered".
    It helps others to find correct solutions!

  2. #47
    New to the CF scene
    Join Date
    Aug 2011
    Posts
    2
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Exclamation

    Quote Originally Posted by dotnetmind View Post
    Have you tried the following Function?


    Code:
     function resizeIframe(obj) {
            obj.style.height = obj.contentWindow.document.body.scrollHeight + 'px';
            obj.style.width = obj.contentWindow.document.body.scrollWidth + 'px';
        }
    Hi,
    i haven't tried that. how would i implement the code you have provided with my code (what would be my complete code after your bit is added). Also would this code automatically resize my iframe width as that is what i am after also?

    Thanks again in advance.

  3. #48
    New to the CF scene
    Join Date
    Sep 2011
    Posts
    2
    Thanks
    0
    Thanked 0 Times in 0 Posts
    My site had the exact same problem but I solved it with a simple script that I added.
    THIS IS MY SITE

    Scroll down to line 52 and simply copy the code to your own site.

  4. #49
    New Coder
    Join Date
    Jun 2005
    Posts
    91
    Thanks
    19
    Thanked 0 Times in 0 Posts
    jackderips/

    I visited your site -http://www.linkpremiumgenerator.com/-, but I could not find any script for iframe at 52 lines.

    And I copied the link I want to include iframe, and press "generate" button, but your site shows "ERROR: [http://test.org/control/test_in.php] Invalid link format", However the the link I wrote is works at browser.

    Would you please let me know how I can see the code you want to share.

  5. #50
    New to the CF scene
    Join Date
    Mar 2013
    Posts
    1
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Anthony, I'm looking for code to resize an iframe. I have tried several things online. It looks like in this line of questions and comments with the code you said works, that I need to name my iframe, as in the last line of the code?

    Do I then also add that name to all the areas in the code that calls for it?

    I notice this is an older post, so any help or direction you can give me I would greatly appreciate....I will keep trying and hope eventually I get somewhere!


 
Page 4 of 4 FirstFirst ... 234

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •