Click to See Complete Forum and Search --> : calling document.write from a thread


cheese_stinks
02-15-2003, 09:54 PM
Looks like I've run into another difficulty again.. the problem is that I can't use document.write to write html where I want it. My script loads images and then waits for them to complete in a function which just keeps checking the status and then setting a flag to true when done. Meanwhile another function keeps checking the flag using a setTimeout loop to call itself every x seconds. When the flag becomes true, this function tries to write a string to the page using document.write but since the function call originated from a new thread created by setTimeout, the string gets written to who knows where and creates errors in the page. Is there any solution to this? Any help would be appreciated.

cheese_stinks
02-15-2003, 10:37 PM
but.. but.. but... I thought innerHTML is only supported by ie, right? I'm trying to make it support netscape as well.

cheese_stinks
02-15-2003, 10:46 PM
Ahh I see, NS6+ supports it even though it's not part of the W3C DOM. Thanks for alerting me to this!