Determine correct state of HTML Browser

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • paragpdoke
    New Member
    • Dec 2007
    • 62

    Determine correct state of HTML Browser

    Hello !
    I recently read about adding a reference to the VB Project of MS HTML Object library and tried out a click or two. It seems a nice way to automate IE actions.

    However, I have some doubts about determining the state of the HTMLDocument object. If one clicks on a link the href of which makes the entire DOM reload (like navigating to a different page for instance), the state is not "complete" [if I'm not mistaken, it is "interactiv e"]. But, on the other hand, if my page has a link with an href like "JavaScript:som eFunction();" and even if the function takes like 15 seconds to finish, the state was still "complete".

    I tried to run the line "Debug.prin t objDOM.readySta te" in a loop. My page had the JavaScript decoding a large Base64 encoded string retrieved from XML file (none of which I'm allowed to share, unfortunately).

    So I guess my question is: Is there some means to programmaticall y find out if the JavaScript triggered by an onclick has finished acting on the HTMLDocument object or not ? This JavaScript could be an internal function or an AJAX request...one can never be sure.

    Thanks in advance for sharing information.
Working...