...

document.write behaves weird

rgann
06-23-2002, 10:10 PM
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.

rgann
06-23-2002, 11:47 PM
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

rgann
06-24-2002, 02:27 AM
Thanks Dave! I think I got it now.

-Reuben



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum