Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 37613
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 10, 20262026-05-10T14:34:41+00:00 2026-05-10T14:34:41+00:00

I have an application that I would like to embed inside our companies CMS.

  • 0

I have an application that I would like to embed inside our companies CMS. The only way to do that (I am told), is to load it in an <iframe>.

Easy: just set height and width to 100%! Except, it doesn’t work.

I did find out about setting frameborder to 0, so it at least looks like part of the site, but I’d prefer not to have an ugly scrollbar inside a page that allready has one.

Do you know of any tricks to do this?

EDIT: I think I need to clarify my question somewhat:

  • the company CMS displays the fluff and stuff for our whole website
  • most pages created through the CMS
  • my application isn’t, but they will let me embedd it in an <iframe>
  • I have no control over the iframe, so any solution must work from the referenced page (according to the src attribute of the iframe tag)
  • the CMS displays a footer, so setting the height to 1 million pixels is not a good idea

Can I access the parent pages DOM from the referenced page? This might help, but I can see some people might not want this to be possible…

This technique seems to work (gleaned from several sources, but inspired by the link from the accepted answer:

In parent document:

<iframe id='MyIFRAME' name='MyIFRAME'      src='http://localhost/child.html'     scrolling='auto' width='100%' frameborder='0'>     no iframes supported... </iframe> 

In child:

<!-- ... --> <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> 

BTW: This will only work if parent and child are in the same domain due to a restriction in JavaScript for security reasons…

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. 2026-05-10T14:34:42+00:00Added an answer on May 10, 2026 at 2:34 pm

    You could either just use a scripting language to include the page into the parent page, other wise, you might want to try one of these javascript methods:

    http://brondsema.net/blog/index.php/2007/06/06/100_height_iframe http://www.experts-exchange.com/Web_Development/Web_Languages-Standards/PHP/Q_22840093.html

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

We have a site that we would like our customers to embed in their
I have an application that was written in vanilla ASP.NET that I would like
i have a swing application that i would like to run on os x
I have an application A that I would like to be able to invoke
I have a Swing application that I would like to convert from spaghetti to
We have an asp.net mvc application that we would like to integrate a FileSystemWatcher
I have an application that needs updating constantly. I would like to create a
I have an application that used Macro. In this macro I would like to
We have an application that logs using log4net. But we would like to delete
I have an application that I have behind a reverse proxy, I would like

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.