Re: IWebBrowser2, frames and DocumentComplete



Thanks Igor, for the quick response..

The issue seems not resolved. The scenario is like this,
Lets say the page has A,B,C frames. I click on a link on frame A. This
updates frame B and C.

The notifications that are coming are in this order (BF ->
BeforeNavigate2, DC->DocumentComplete),
BF(Frame B)
DC(Frame B)
BF(Frame C)
DC(Frame C)

The problem is, after DC(Frame B), I am thinking the document is
completely loaded, which is not the case. Supposing I want to do some
operation after the page is completely finished. In this particular
case, I am duplicating the action, one after DC(B) and other after
DC(C). I want to remove this duplicate effort, and do it only after
DC(C).

Am I missing something ?
Thanks,
Sanjoy

Igor Tandetnik wrote:
"Sanjoy Bose" <sanjoyb@xxxxxxxxx> wrote in message
news:1156608689.207691.279680@xxxxxxxxxxxxxxxxxxxxxxxxxxxx
I have a page containing multiple frames. However, on clicking on a
link on one frame, updates the sibling frames. I have been able to get
DocumentComplete notification, for each individual frames seperately
in the standard way, discussed lot of times. But I am not getting
DocumentComplete notification for the main IWebBrowser2 (source)
object.

It does not fire one if it had not been reloaded. Only the frame that
actually performs the navigation fires the DocumentComplete event.

Therefore, I am not being able to figure out, when the whole
page is complete.

When you got as many DocumentComplete as you got BeforeNavigate2
--
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: IWebBrowser2, frames and DocumentComplete
    ... number of DocumentComplete, however, number of NavigateComplete2 is ... "I've just seen a navigation in frame B; I know that frame C is going to ... But which is the last DocumentComplete Event? ...
    (microsoft.public.inetsdk.programming.webbrowser_ctl)
  • Re: Problem with HTMLDocumentEvents on Gmail
    ... I'm interested in OnClick event ... HtmlDocumentEvent object. ... Events don't bubble across frame boundaries. ... DocumentComplete and similar events. ...
    (microsoft.public.inetsdk.programming.webbrowser_ctl)
  • Re: How to detect if a web page is "fully loaded"?
    ... > OnDocumentComplete will be called multiple times. ... On a page with frames or iframes, DocumentComplete is fired by each ... frame as well as a frameset. ...
    (microsoft.public.inetsdk.programming.webbrowser_ctl)
  • Re: IWebBrowser2, frames and DocumentComplete
    ... I click on a link on frame A. This ... link on one frame, updates the sibling frames. ... DocumentComplete notification, ...
    (microsoft.public.inetsdk.programming.webbrowser_ctl)
  • NavigateComplete2 -> DocumentComplete confusion, not well formed
    ... the first frame) and DocumentComplete (where I check the current disp ... and if it equals the stored one I know it is the top frame). ... but disp 0x00cf8d50 appears in DocumentComplete BEFORE ... appears in NavigateComplete2, ...
    (microsoft.public.inetsdk.programming.webbrowser_ctl)