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.
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.
Comment