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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 14, 20262026-05-14T02:44:17+00:00 2026-05-14T02:44:17+00:00

I have a page being loaded in an <iframe> . Inside the <iframe> ,

  • 0

I have a page being loaded in an <iframe>.

Inside the <iframe>, I have a function that patiently waits for the page to load using jQuery’s $(window).load() event which is supposed to wait until ALL page content (images, javascript, css, etc.) is loaded before firing.

The function then calls back to the page loading the <iframe> using postMessage to send the height of the content in the <iframe> back.

I have tested the functionality in IE7, IE8, Firefox 2, Firefox 3, Opera, and Chrome and everything works fine. When I try to load the page in Safari, the function makes its call back before images are loaded…thus giving me the wrong page height.

Does anybody out there know how to force Safari to wait for images to be loaded before calling a function (jQuery solutions are preferable in this case)?

  • 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-14T02:44:18+00:00Added an answer on May 14, 2026 at 2:44 am

    Checking for an offset forces safari for finish loading/layout out the content, it blocks javascript until the return completes. You can use it like this:

    $(window).load(function() {
      var block = document.body.offsetWidth;
      //Rest of code...
    });
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a page being loaded with jQuery. The initial load includes 100 records
I'm using the jQuery load() event to load a page into an iframe. The
I have a web page that is being displaying in a winform app using
I have an ASPX page that is sometimes loaded into an iFrame in my
I have an iframe that is being loaded into external sites of which I
I have the following site layout. Main page is being loaded using url rewriting
in short, i have a page where the content is being loaded with jquery
I have a page that, using jQuery .ajax that is called 100 times (async:
I have a page in html (parent page) that have inside an iframe. When
I have a page that has several (20+) scripts that are being loaded. One

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.