Register

If this is your first visit, please click the Sign Up now button to begin the process of creating your account so you can begin posting on our forums! The Sign Up process will only take up about a minute of two of your time.

Results 1 to 3 of 3
  1. #1
    Junior Member
    Join Date
    May 2003
    Posts
    18
    Member #
    1365
    I'm sure this is going to be an easy one for all of you (or at least I hope :classic: ).

    Again, I have this function in the top frame of a page that document.writes to a bottom frame. This happens in a loop set by
    setTimeout("checkStatus()", 500), that calls itself for several hundreds of times, each time writing a few more lines to the bottom frame (appending).

    This works great most of the time. New lines are being added and the bottom frame's document is displayed appropriately.

    BUT, sometimes, and only sometimes (once in 50 times or so I test this page) in the middle of document.writing to the bottom page, instead of appending, the document.write clears the entire frame (and document) and starts to write it a new, with new lines after this again appending to the document.
    Why? I couldn't find a pattern why would one line clear the document while the others append to it, especially since it happens only once in while.

    Thanks in advance,
    Roy.

  2.  

  3. #2
    Senior Member
    Join Date
    Jun 2003
    Location
    Australia
    Posts
    735
    Member #
    1935
    try document.writeIn

  4. #3
    WDF Staff smoseley's Avatar
    Join Date
    Mar 2003
    Location
    Boston, MA
    Posts
    9,729
    Member #
    819
    Liked
    205 times
    It will reset the page if the document hasn't been created yet (i.e. if the body hasn't been created yet).

    What you should do to alleviate the problem is put your document.write statements into a function and call them from embedded scripts in the body, or from the body onload event.


Remove Ads

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
All times are GMT -6. The time now is 09:37 PM.
Powered by vBulletin® Version 4.2.3
Copyright © 2020 vBulletin Solutions, Inc. All rights reserved.
vBulletin Skin By: PurevB.com