Click to See Complete Forum and Search --> : document.write basics


Webskater
09-05-2003, 09:24 AM
I sometimes use document.write in the middle of a function to write something to the screen so I can see what is going on. When I do this the page stops and literally what the document.write is supposed to write appears on the screen.

Yet I see other people using document.write to construct whole chunks of html and writing it to the screen as part of a page.

What is the difference please?

Khalid Ali
09-05-2003, 09:34 AM
you can use document.write in such a logical flow that everythingis written before the document is loaded,once a document completes loading thenyou will see the behaviour that you experienced.

Webskater
09-05-2003, 09:36 AM
Thanks Khalid.

Khalid Ali
09-05-2003, 09:41 AM
you are welcome..:)