Re: IWebBrowser2, frames and DocumentComplete



Thanks again. Comments/Question inline... I appreciate your help.
Sanjoy

Igor Tandetnik wrote:
"Sanjoy Bose" <sanjoyb@xxxxxxxxx> wrote in message
news:1156611803.689880.221830@xxxxxxxxxxxxxxxxxxxxxxxxxxxx
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.

It sort of is, as far as the browser is concerned. Logically it may not
be, but techincally it is. Consider:

function navigateTwoFrames() {
setTimeout("frameB.navigate(urlB)", 1);
setTimeout("frameB.navigate(urlB)", 1000);
}

A single click starts two navigations about a second apart. Your
application's logic may consider this a single operation, but I don't
see how you can realistically group the two navigations together just by
watching browser events. They are going to be indistinguishable from the
user clicking a link in one frame, and then clicking a link in the other
frame a second later.

The application which does this, can be any web application. My
application is only the BHO.
I understand, that this true from technical point of view. But to a
user the new page is not yet completely displayed (one frame is
updated, other is not). I want to understand from my application, when
the whole page(all frames) has finished updating (think as the user
thinks..). It should be quite reasonable requirement...


Supposing I want to do some
operation after the page is completely finished.

Define "completely finished". To me it means "no navigation is currently
in progress". You seem to want to define it as "nobody contemplates
starting a new navigation in the near future". Prescience is not yet
fully developed in computers.

The reason I want to do this, is the operation I do after, may be
costly, which may be as costly as parsing a DOM or serializing a DOM.
So I don't want to do this costly operation on twice, and on a DOM
which is valid, but is half way through transition (only one frame
updated)


I guess if you really need to handle this situation, you can wait a
little after the last DocumentComplete event and declare the page
"complete" if no new navigation starts during this wait period.

But which is the last DocumentComplete Event ? If I understand the last
DocumentComplete, then the solution is there..isn't it ? Frame B's
DocumentComplete may come even before Frame C's BeforeNavigate2 or
NavigateComplete2..right ?

Thanks,
Sanjoy
--
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: Connecting and Disconnecting events for IHTMLWindow2
    ... > navigation, every refresh, I want to be able to get ... > HTMLWindowEvents2::onload for every frame in the new page. ... you have access to window and document ... > existing IHTMLWindow objects and create new ones for all the frames on ...
    (microsoft.public.inetsdk.programming.webbrowser_ctl)
  • Re: Java Script
    ... >> I ask this because using Java applets for navigation, frankly, sucks ... The page uses 2 frames Top to hold the flash and Nav Bar. ... frame and have it over lay the bottom frame. ... > Jeffrey D. Silverman | jeffrey AT jhu DOT edu ...
    (alt.os.linux.redhat)
  • Re: web site estimate(value)
    ... Some of the left navigation in the lower frame is out of sight and inaccessible at 800 by 600. ... Drop down menus, flash> portions to highlight certain aspects, a "brochure" page which was> requested to have a particular font used! ... > MenuMaker and an FTP program which I prefer using for uploading. ...
    (microsoft.public.frontpage.client)
  • Re: What are drawbacks to using Frames?
    ... navigation frame containing the links to the site pages can be very ... frame, you get the problem that the search engines send people directly ... navigation bar missing. ...
    (microsoft.public.frontpage.client)