Re: "onDocumentComplete" and reading the DOM of a loaded page

Tech-Archive recommends: Repair Windows Errors & Optimize Windows Performance



"Noa" <Noa@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote in message
news:6954CCED-4A4C-4C64-A857-5B537BD85889@xxxxxxxxxxxxx
> When I get the "onDocumentComplete" in my BHO, it occurs BEFORE the
> script of the "onload" is executed. I know that for sure because i
> actually take advantage of that to change the onload script...
> However it is not according to documentation i think.
>
> Anyway - if i need to read the DOM, It might be to early at this
> point , since the dom might change in the onload... What i need is
> the DOM after the onload occured....

Post yourself a user-defined window message. By the time the message
arrives onload action is complete.
--
With best wishes,
Igor Tandetnik

With sufficient thrust, pigs fly just fine. However, this is not
necessarily a good idea. It is hard to be sure where they are going to
land, and it could be dangerous sitting under them as they fly
overhead. -- RFC 1925


.



Relevant Pages

  • Re: Dynamic select lists using optgroups again - without frameworks
    ... function at the bottom of the last script element, ... in the last script element. ... document.body or whatever) or DOM ready and it has the pleasant side ... Using onload is also based on the "mere assumption" that the UA ...
    (comp.lang.javascript)
  • Re: Causing File Download on Page Load
    ... Script code in the document head or body is executed while the document is ... So script in the onload handler executes after the document is finished loading? ... and not using a wrapper. ...
    (comp.lang.javascript)
  • Re: DOMContentReady and focus() in Opera
    ... Have the onload listener check to see if the DOM ready ... using a script which did its setup in an onload handler. ...
    (comp.lang.javascript)
  • Re: Dynamic select lists using optgroups again - without frameworks
    ... in the last script element. ... The DOM will be ready and you don't need to use window.onload (or ... Using onload is also based on the "mere assumption" that the UA ... at the time the feature was introduced, ...
    (comp.lang.javascript)
  • Re: Build web apps in Javascript - new service open for beta
    ... You are using the onload event of two entirely different ... was attempting to add an event handler to a single element. ... means do it by script. ... Your "senior programmer" should be demoted to junior ...
    (comp.lang.javascript)