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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 17, 20262026-05-17T22:39:40+00:00 2026-05-17T22:39:40+00:00

I just asked a question here, about why an iframe_resize function wasn’t working. After

  • 0

I just asked a question here, about why an iframe_resize function wasn’t working.

After troubleshooting, I found out that the problem is not the function, so I am posting a new question.

I have an index.html with this resize function:

function resize_iframe(new_height){
    document.getElementById('iframe001').style.height=parseInt(new_height) + 20 + 'px';
}

Then I have a form in index.html with target set to an iframe, and action set to query.php:

   <form action='query.php' target='iframe001'>

The in my query.php:

 //ALOT OF PHP HERE
 <body onload="parent.resize_iframe(document.body.scrollHeight)">
 <?php echo $results_table; ?>
 </body>

The problem is, in Chrome and Safari, the scrollHeight isn’t changed at all.

In all other browsers, scrollHeight changes and the function works.

However, in Chrome/Safari, when clicking on a link anywhere on the page, and then clicking on the browser back button to return to the search results (iframe content), THEN the iframe is resized properly even in Chrome/Safari… ?

This is very strange behaviour for me.

Can somebody explain this?

Thanks

PS: I think this person has the same problem: iframe resizing with scrollheight in chrome/safari

  • 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-17T22:39:40+00:00Added an answer on May 17, 2026 at 10:39 pm

    Did you try offsetHeight property?

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

Sidebar

Related Questions

I just asked a question here about selecting all id's of the form id_*
I've asked one question about this a month ago, it's here: "post" method to
This is an offshoot question that's related to another I asked here . I'm
I just asked this question . Which lead me to a new question :)
A related question to one I asked earlier ... Just checking on something: Should
I was just browsing a forum and someone asked about a PHP file they
I've never asked a question here before so please forgive my question if its
So the other day, I asked this question about how to combine three complex
A similar question was asked and answered about a year ago, but was either
Disclaimer This question is a repost. I originally asked it here . While there

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.