Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 3 of 3
  1. #1
    New to the CF scene
    Join Date
    Jun 2002
    Posts
    6
    Thanks
    0
    Thanked 0 Times in 0 Posts

    document.write behaves weird

    I have a script which should display a webpage and then (hopefully) after a 4 second delay, change the last line to say something else. I'm doing the whole page in script (so as not to run into multiscripting problems) and use document.write to write to the page. My final line is

    self.setTimeout("document.write(quotes[0])", 4000)

    where quotes is an array of strings. This line "works", but the text is displayed on a white background at the top...it removes all the previous html and writes only this! So what you see is my webpage without this line, wait 4 seconds, which page with this string at the top. If I just call document.write("quotes[0]") the script does what I want it to do (writes that string to the end of the file). Any clues?

    -Reuben

    P.S. Also, if someone knows how I can remove the previous line of text and replace it with a new one, it'd be awesome if you could tell me. TIA.

  • #2
    New to the CF scene
    Join Date
    Jun 2002
    Posts
    6
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Post

    Ok, so how can I do this? Do I have to make an input form and update that? I really don't like the way that looks. Anybody have a solution where I can change the text in the page?

    -Reuben

  • #3
    New to the CF scene
    Join Date
    Jun 2002
    Posts
    6
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Thanks Dave! I think I got it now.

    -Reuben


  •  

    Posting Permissions

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