Code Help...Iframe. I'm Close...

Discussion in 'Cloaking and Content Generators' started by bigg_capp, Jan 1, 2012.

  1. bigg_capp

    bigg_capp Jr. VIP Jr. VIP

    Joined:
    Aug 24, 2010
    Messages:
    485
    Likes Received:
    446
    Occupation:
    MAKING MONEY
    Location:
    On My Grind
    Home Page:
    Ok, I'm no expert, but I have been trying to Iframe a full website and it's driving me crazy.

    I used this code, I put this in my header:

    Code:
    <iframe id="MyIFRAME" name="MyIFRAME"      src="http://www.yahoo.com"     scrolling="auto" width="100%" frameborder="0">     no iframes supported... </iframe>
    And put this code in my Page html portion

    Code:
    <!-- ... -->
    <body>
    <script type="text/javascript">
        function resizeIframe() {
    
            var docHeight;
            if (typeof document.height != 'undefined') {
                docHeight = document.height;
            }
            else if (document.compatMode && document.compatMode != 'BackCompat') {
                docHeight = document.documentElement.scrollHeight;
            }
            else if (document.body 
                && typeof document.body.scrollHeight != 'undefined') {
                docHeight = document.body.scrollHeight;
            }
    
            // magic number: suppress generation of scrollbars...
            docHeight += 20;
    
            parent.document.getElementById('MyIFRAME').style.height = docHeight + "px";    
        }
        parent.document.getElementById('MyIFRAME').onload = resizeIframe;
        parent.window.onresize = resizeIframe;
    </script>               
    </body>
    Here is the result I got: http://freeformula.justmho.com/?page_id=179
    Really close but no cigar. I can't get the height to auto resize.

    Any help with this? I also tried to use the code in this thread but couldn't get it to work either.

    If anyone can help a brotha out that would be great.

    -Capp
     
  2. diceinc

    diceinc Regular Member

    Joined:
    May 15, 2009
    Messages:
    288
    Likes Received:
    28
    Occupation:
    Freelancer
    you want to iframe the whole yahoo page?
     
  3. artizhay

    artizhay BANNED BANNED

    Joined:
    Nov 21, 2010
    Messages:
    1,868
    Likes Received:
    1,336
    Do this instead:
    HTML:
    <html>
    <head>
    	<title>Full page frame</title>
    	<style type="text/css">
    	html, body{
    		margin:0;
    		padding:0;
    		overflow:auto;
    	}
    	</style>
    </head>
    <frameset rows="100%, *" border="0" framespacing="0" frameborder="0">
    	<frame noresize="" src="http://www.yahoo.com/"></frame>
    </frameset>
    </html>
     
    • Thanks Thanks x 5
  4. bigg_capp

    bigg_capp Jr. VIP Jr. VIP

    Joined:
    Aug 24, 2010
    Messages:
    485
    Likes Received:
    446
    Occupation:
    MAKING MONEY
    Location:
    On My Grind
    Home Page:
    YESSS!!

    Thanks artizhay! That shit worked like a f*ckin' charm!! OMG!
    Rep and thanks giving. Now I can go out with my girlfriend without being pissed off. lol. ......but of course, now I don't want to go because I have work to do with my iframe!!

    Thanks Again and Happy New Year!!
    -Capp
     
    • Thanks Thanks x 1
  5. artizhay

    artizhay BANNED BANNED

    Joined:
    Nov 21, 2010
    Messages:
    1,868
    Likes Received:
    1,336
    You're welcome. Have a good night and a happy new year!
     
    • Thanks Thanks x 1