By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
445,678 Members | 1,158 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 445,678 IT Pros & Developers. It's quick & easy.

iframe height

P: 49

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 (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).

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

Here is the source code of that page:

Expand|Select|Wrap|Line Numbers
  1. <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Frameset//EN">
  2. <HTML>
  3. <HEAD>
  4. <TITLE>'s Career Center - Hyderabad's largest job database</TITLE>
  5. <LINK REL="SHORTCUT ICON" HREF="favicon.ico">
  6. <SCRIPT TYPE="text/javascript">
  7. <!--
  8. var loaded = 1;
  9. function loadMyPages(pageA, pageB, pageC, pageD)
  10. {
  11.     if (loaded>1)
  12.     {
  13.         window.frames["frame1"].location.href = pageA;
  14.         window.frames["frame3"].location.href = pageB;
  15.         window.frames["120x600"].location.href = pageC;
  16.         window.frames["frame4"].location.href = pageD;
  17.     }
  18.     loaded++;
  19. }
  20. // -->
  21. </SCRIPT>
  23. <DIV ID="Layer1">
  24.     <DIV ALIGN="LEFT">
  25.         <IFRAME NAME="frame1" FRAMEBORDER="0" SCROLLING="NO" WIDTH="790" HEIGHT="85" SRC="careerbuilder/header.html" MARGINWIDTH="0" MARGINHEIGHT="0"></IFRAME>
  26.     </DIV>
  27.     <DIV STYLE="float: left; padding-left: 4px">
  28.         <DIV>
  29.             <IFRAME NAME="frame4" FRAMEBORDER="0" SCROLLING="NO" WIDTH="631" HEIGHT="235" SRC="careerbuilder/menu.html" MARGINWIDTH="0" MARGINHEIGHT="0"></IFRAME>
  30.         </DIV>
  31.         <DIV>
  32.             <IFRAME NAME="frame2" FRAMEBORDER="0" SCROLLING="NO" WIDTH="631" HEIGHT="650" SRC=""  onload="loadMyPages('careerbuilder/header.html', 'careerbuilder/footer.html','', 'careerbuilder/menu.html')"></IFRAME>
  33.         </DIV>
  34.     </DIV>
  35.     <DIV STYLE="padding-left: 5px;">
  36.         <SCRIPT LANGUAGE="JavaScript" SRC=""></SCRIPT>
  37.         <IFRAME NAME="120x600" ID="120x600" SRC="" WIDTH="125" HEIGHT="600" FRAMEBORDER="0" SCROLLING="NO"></IFRAME>
  38.     </DIV>
  40.     <DIV>
  41.         <IFRAME NAME="frame3" FRAMEBORDER="0" SCROLLING="NO" WIDTH="631" SRC="careerbuilder/footer.html"></IFRAME>
  42.     </DIV>
  43. </DIV>
  44. </BODY>
  45. </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!
Jun 16 '07 #1
Share this Question
Share on Google+
1 Reply

Expert Mod 15k+
P: 16,027
See this page. See the section on Page Height.
Jun 18 '07 #2

Post your reply

Sign in to post your reply or Sign up for a free account.