Does this problem occur when you load the page in a browser (IE, for
instance) ?

Ideally, the JS code in the page should run only after the page has
loaded (it should be invoked only before the ending </body> tag or
within <body onload="">.

On Jun 19, 11:09 pm, Anonymous <[email protected]> wrote:
> Right now, for debugging purposes, I've set a webbrowser control on my
> application to be visible.  The webbrowser sometimes (occasionally)
> fires a documentcompleted event but the page hasn't finished loading
> yet (the control is blank white still).  In the javascript on the
> page, one line of code uses the getElementById method, but for some
> reason, even though the "document is completed" the element somehow
> hasn't loaded yet and the javascript returns an error because it
> couldn't find an element with that id.
> I don't get why documentcompleted doesn't fire properly.

Reply via email to