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.
Results 1 to 3 of 3

Thread: iframe height

  1. #1
    New Coder
    Join Date
    Jun 2007
    Posts
    61
    Thanks
    13
    Thanked 0 Times in 0 Posts

    iframe height

    Hi,

    I posted this query on another thread, but there it was kinda off-topic since the thread was intended to discuss another problem, which got solved.

    I have an iframe that fetches content from a different domain. This is my URL, which has an iframe that fetches content from another site careerbuilder.co.in (this is a partnership channel, so they will co-operate if there are small things they need to do in their code, like putting something in the body tag or adding some script, though I would ideally like everything to be done in this page, and not in their pages).

    http://www.fullhyd.com/htdocs/jobs/home.html

    Now, I want that iframe's height to match that of the specific page that has loaded from careerbuilder.co.in. I have tried several different approaches, but 3 days later I am at square 1.

    Here is the source code of that page:

    Code:
    <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Frameset//EN">
    <HTML>
    <HEAD>
    <TITLE>fullhyd.com's Career Center - Hyderabad's largest job database</TITLE>
    <LINK REL="SHORTCUT ICON" HREF="favicon.ico">
    <SCRIPT TYPE="text/javascript">
    <!--
    var loaded = 1;
    function loadMyPages(pageA, pageB, pageC, pageD)
    {
    	if (loaded>1)
    	{
    		window.frames["frame1"].location.href = pageA;
    		window.frames["frame3"].location.href = pageB;
    		window.frames["120x600"].location.href = pageC;
    		window.frames["frame4"].location.href = pageD;
    	}
    	loaded++;
    }
    // -->
    </SCRIPT>
    <BODY BGCOLOR="#FFFFFF"> 
    <DIV ID="Layer1">
    <DIV ALIGN="LEFT">
    	<IFRAME NAME="frame1" FRAMEBORDER="0" SCROLLING="NO" WIDTH="790" HEIGHT="85" SRC="careerbuilder/header.html" MARGINWIDTH="0" MARGINHEIGHT="0"></IFRAME>
    </DIV>
    <DIV STYLE="float: left; padding-left: 4px">
    	<DIV>
    		<IFRAME NAME="frame4" FRAMEBORDER="0" SCROLLING="NO" WIDTH="631" HEIGHT="235" SRC="careerbuilder/menu.html" MARGINWIDTH="0" MARGINHEIGHT="0"></IFRAME>
    	</DIV>
    	<DIV>
    		<IFRAME NAME="frame2" FRAMEBORDER="0" SCROLLING="NO" WIDTH="631" HEIGHT="650" SRC="http://www.careerbuilder.co.in"  onload="loadMyPages('careerbuilder/header.html','careerbuilder/footer.html','http://www.fullhyderabad.com/adserver/iframes/120x600.php','careerbuilder/menu.html')"></IFRAME>
    	</DIV>
    </DIV>
    <DIV STYLE="padding-left: 5px;">
    	<SCRIPT LANGUAGE="JavaScript" SRC="http://www.fullhyderabad.com/adserver/iframes/resize.js"></SCRIPT>
    	<IFRAME NAME="120x600" ID="120x600" SRC="http://www.fullhyderabad.com/adserver/iframes/120x600.php" WIDTH="125" HEIGHT="600" FRAMEBORDER="0" SCROLLING="NO"></IFRAME>
    </DIV>
    
    <DIV>
    	<IFRAME NAME="frame3" FRAMEBORDER="0" SCROLLING="NO" WIDTH="631" SRC="careerbuilder/footer.html"></IFRAME>
    </DIV>
    </DIV>
    </BODY>
    </HTML>
    The iframe named "frame2" is what I am struggling with. Everytime that someone clicks on any link from that iframe, the iframe needs to resize so that the new page that loads fits into the frame, hight-wise.

    Has anyone struggled with this problem before? I'd be quite grateful for any ideas.

    Thank you for the time spent reading this!

  • #2
    Supreme Master coder! glenngv's Avatar
    Join Date
    Jun 2002
    Location
    Philippines
    Posts
    11,068
    Thanks
    0
    Thanked 256 Times in 252 Posts
    Glenn
    ____________________________________

    My Blog
    Tower of Hanoi Android app (FREE!)
    Tower of Hanoi Leaderboard
    Samegame Facebook App
    vBulletin Plugins
    ____________________________________

  • #3
    New Coder
    Join Date
    Jun 2007
    Posts
    61
    Thanks
    13
    Thanked 0 Times in 0 Posts

    Thanks!

    Thank you for that, Glenn! Have a good day.


  •  

    Posting Permissions

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