dcsimg
Results 1 to 3 of 3

Thread: i can't make the iframe load LAST !!!

  1. #1

    Thread Starter
    Frenzied Member wengang's Avatar
    Join Date
    Mar 2000
    Location
    Beijing, China
    Posts
    1,531

    i can't make the iframe load LAST !!!

    Hi all.

    I have page with one IFRAME that loads data from the database. The probllem with this page is that the parent page won't fully load until the data loads in the iframe, making thepage look blank and strange for about 10 seconds

    I first used javascript to preload all images on the page. That helped some, but it still misses about 50% of the time. Then I removed the source of the IFRAME and at the end of the page, after body close, I loaded the source of the iframe in another Javascript

    That does not do anything.

    I did a setTimeout in the javascript to delay loading the source, to see if the outer page could load first, but it doesn't , it just takes that much longer.

    What it lacks is a sort of doevents type ability.

    I don't know how to make the IFrame wait until the parent page is fully loaded before loading the iframe

    maybe some kind of body load finished??

    Thanks
    Wengang
    Wen Gang, Programmer
    VB6, QB, HTML, ASP, VBScript, Visual C++, Java

  2. #2
    Hyperactive Member
    Join Date
    May 2002
    Location
    Wisconsin, USA
    Posts
    279
    How much data are you pulling back from the database?

  3. #3

    Thread Starter
    Frenzied Member wengang's Avatar
    Join Date
    Mar 2000
    Location
    Beijing, China
    Posts
    1,531
    Resolved.

    Yes.I'm an idiot.

    I had the javascript that loaded the frames in the head, and I had tried calling from body onLoad.

    Then finally I found that one of my js functions didn't have a closing }

    So none of my scripts were running. I had assumed that they were not running, or just taking too long.

    Anyway, the solution is just body onLoad="function()"

    Then I put the actual frames, not the source, into the Script like
    getElementByid('whateverTD').innerHTML = "<iframe.......>"

    The benefit of that is there will not be a big blank white space on my page before the iframe loads

    Thanks
    Wen Gang, Programmer
    VB6, QB, HTML, ASP, VBScript, Visual C++, Java

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Featured


Click Here to Expand Forum to Full Width