Results 1 to 3 of 3

Thread: Frame loading problem

  1. #1

    Thread Starter
    Hyperactive Member
    Join Date
    Nov 1999
    Posts
    266
    Hi all,
    I have got 2 frames on my HTML page. The Onload event of the first frame document accesses a form element in the second frame document. How do I ensure that the second frame document has been loaded completely before I access its elements.

  2. #2
    Frenzied Member monte96's Avatar
    Join Date
    Sep 2000
    Location
    Somewhere in AZ
    Posts
    1,379
    You could put your call to the other page in a function and use SetTimeout to call it.
    oOOo--oOOo
    __/\/\onte96
    oOOo--oOOo
    Senior Programmer/Analyst
    MCP
    [email protected]
    [email protected]


    Your results may vary.. some restrictions may apply.. pricing and participation may vary.. not available in all states.. professional driver closed course..quantities limited..

  3. #3
    Frenzied Member Mark Sreeves's Avatar
    Join Date
    Nov 1999
    Location
    UK
    Posts
    1,845
    here's something I'm playing with at the moment
    (it might be IE only though)

    Code:
    while(parent.framename.document.readyState !== "complete")
    {
    //loop
    }
    I am playing with this to try to automate page printing. I'm using a ScriptX component to print the frame once it has finised loading.

    Sometimes it waits sometimes not. I intend to find out why today!

    In fact, I've just had an idea! What you could do is have a function on page one which tests a flag using SetTimeout and have the flag set by a function on page 2 which is called from its onload event.

    did that make sense to you?
    Mark
    -------------------

Posting Permissions

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



Click Here to Expand Forum to Full Width