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 868451
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 15, 20262026-05-15T10:08:31+00:00 2026-05-15T10:08:31+00:00

Before the "beating a dead horse" comments begin, let me clarify what I am

  • 0

Before the "beating a dead horse" comments begin, let me clarify what I am trying to do to see if someone can help me.

I have a parent window with an iFrame in it. The content in the iFrame is loaded from a separate domain which is where I think my problems begin, although it needs to be this way. When the page originally loads I have the following running:

<script language="javascript" type="text/javascript">
    var reportFrame = document.getElementById('report');

    function resizeIframe() {
        var height = document.documentElement.clientHeight;

        height -= reportFrame.offsetTop;

        // not sure how to get this dynamically
        height -= 20; /* whatever you set your body bottom margin/padding to be */

        reportFrame.style.height = height + "px";

    }

    reportFrame.onload = resizeIframe;
    window.onresize = resizeIframe;
    
</script>

This works great. The iFrame doesn’t have any scrollbars and looks perfect to how I want. The problem I run into is the iFrame has a button that causes a post-back on the frame. I need to have this script run when the iFrame reloads itself to prevent any scrollbars from showing. Due to the child page being on a separate domain I’m not able to call a function from it to the parent (pretty sure this is where XSS comes into play) so I need to come up with another way for the parent to know it needs to run this script because the iFrame is reloading itself.

Any suggestions?

  • 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. Editorial Team
    Editorial Team
    2026-05-15T10:08:31+00:00Added an answer on May 15, 2026 at 10:08 am

    You could add a timer which checks and resizes at regular intervals:

    setInterval( "resizeIframe()", 1000 ); //check every second
    

    [Edit – links for resize scripts]

    Check out Link and Resizing an iframe based on content for scripts on resizing an iframe.

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

Sidebar

Related Questions

Before asking my question, let me explain the context. CONTEXT: I have a web
Before I ask the question let me state that I have attempted to google
Can you please help to get this code for SQL? I have column name
Why if I put an element before the "p" lines, I don't see the
How can I "from program" (I mean before I do "final return" I want
I've come across the terms "RNA" and "RNA property" in programming documentation before. Can
I'm trying to "stack" some text, but have one small word inserted among the
I have never used jQuery before and I'm trying to do something really simple
Before asking the question let me preface with the fact that I am new
(Before I start, yes I have asked a similar question before; unfortunately due to

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.