[thelist] document.write

.jeff jeff at members.evolt.org
Tue Jul 23 17:51:01 CDT 2002


> From: Tom Dell'Aringa
> > before or after the page has finished loading?
> I currently am doing it using onLoad just to test. I
> think in the final, I could do it whichever way works
> best.

ok, so you're currently doing it after the page loads.  am i right in guessing that you're getting errors? or not?  at any rate, if you do it with the onload event handler, you're effectively overwriting the entire contents of the current document, including the function that's doing the document.write()ing.

the exception is if you're writing the contents to another frame.

> I will be instatiating a JS object, and then calling its
> method sometime during load or onload.

i would recommend against that if you're stuck using document.write().  instead, put your script block inline where you want the content written.  don't use a function.  just script it out and let it write it wherever you put the script block.

holler if i'm not understanding your problem.



jeff at members.evolt.org

More information about the thelist mailing list