Re: How can I know when the URL I specified to Navigate method get loaded?




"yuzhu.shen" <yuzhu.shen@xxxxxxxxx> wrote in message
news:24f4ec88-09d7-4b31-8015-85e268610d4b@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
Approach (2) After I invoke Navigate(), I just treat the NEXT
NavigationComplete2 on the top-level frame to be the "http://foo.bar";.
However, I think this may be wrong in some rare too, here is an
example:

Invoke Navigate() with "http://not.foo.bar"; --> Invoke Navigate() with
"http://foo.bar"; --> OnNavigateComplete2( "http://not.foo.bar"; ) -->
OnNavigateComplete2( "http://foo.bar"; )

If you call Navigate again on the same browser, any previous navigation
still in progress will be aborted, and you won't get NavigateComplete2
event for it.

Hi, Igor.

I thinked up another example this time ( and tested it ).

============================
Currently in page A --> Invoke Navigate() with "http://foo.bar"; -->
Very quickly click a link to "http://not.foo.bar"; in page A -->
OnNavigateComplete2("http://not.foo.bar";)
=============================

In this case, I still cannot determine by the NEXT
OnNavigateComplete2() that "http://foo.bar"; gets loaded.
Or, if the url I navigate is not a HTML page, instead it is an exe
file.

============================
Currently in page A --> Invoke Navigate() with "http://foo.bar/a.exe";
--> (no OnNavigateComplete2() for "http://foo.bar/a.exe";) --> Some
time later, user click some link or input some other url to navigate --
OnNavigateComplete2("http://still.not.foo.bar";).
=============================

According to these examples, I think approach (2) is still
problematic: after I invoke Navigate() with "http://foo.bar";, I cannot
just treat the NEXT NavigationComplete2 on the top-level frame to be
the "http://foo.bar";.

Any guidance would be deeply appreciated!!


Perhaps implementing DWebBrowserEvents might help you ??
Leslie.


.



Relevant Pages